Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_test_failure_exception.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2023-03-12 00:45:31 +0100
committerMartin Hořeňovský2023-03-12 00:45:31 +0100
commit1dfaa8abe7ee6da548697ed8c6a704a2e7db1e41 (patch)
tree990da5e43ecb57ae6eb89f57b5907a5f3db9864d /src/catch2/internal/catch_test_failure_exception.cpp
parentba94278bdd0fb22e94490e5fefd65f356c37947c (diff)
downloadcatch3-1dfaa8abe7ee6da548697ed8c6a704a2e7db1e41.tar.gz
Outline throwing of TestSkipException
Diffstat (limited to 'src/catch2/internal/catch_test_failure_exception.cpp')
-rw-r--r--src/catch2/internal/catch_test_failure_exception.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_test_failure_exception.cpp b/src/catch2/internal/catch_test_failure_exception.cpp
index c1edff3c..8ea31313 100644
--- a/src/catch2/internal/catch_test_failure_exception.cpp
+++ b/src/catch2/internal/catch_test_failure_exception.cpp
@@ -20,4 +20,12 @@ namespace Catch {
#endif
}
+ void throw_test_skip_exception() {
+#if !defined( CATCH_CONFIG_DISABLE_EXCEPTIONS )
+ throw Catch::TestSkipException();
+#else
+ CATCH_ERROR( "Explicitly skipping tests during runtime requires exceptions" );
+#endif
+ }
+
} // namespace Catch