diff options
| author | Martin Hořeňovský | 2023-03-12 00:45:31 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-03-12 00:45:31 +0100 |
| commit | 1dfaa8abe7ee6da548697ed8c6a704a2e7db1e41 (patch) | |
| tree | 990da5e43ecb57ae6eb89f57b5907a5f3db9864d /src/catch2/internal/catch_test_failure_exception.cpp | |
| parent | ba94278bdd0fb22e94490e5fefd65f356c37947c (diff) | |
| download | catch3-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.cpp | 8 |
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 |