diff options
| author | Martin Hořeňovský | 2022-01-01 16:45:28 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-01-01 16:45:28 +0100 |
| commit | ef3374ed813590525527f229994b58c094e9c12e (patch) | |
| tree | 5d7a87b5b03e5e107230f2e008490f7c8ab52868 | |
| parent | f2f585b4788b61ed202e78b73b105f099d9cce7b (diff) | |
| download | catch3-ef3374ed813590525527f229994b58c094e9c12e.tar.gz | |
Add more macros to the DisabledMacros test
| -rw-r--r-- | tests/ExtraTests/X02-DisabledMacros.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ExtraTests/X02-DisabledMacros.cpp b/tests/ExtraTests/X02-DisabledMacros.cpp index 5a756d70..44007364 100644 --- a/tests/ExtraTests/X02-DisabledMacros.cpp +++ b/tests/ExtraTests/X02-DisabledMacros.cpp @@ -3,6 +3,9 @@ // and expressions in assertion macros are not run. #include <catch2/catch_test_macros.hpp> +#include <catch2/benchmark/catch_benchmark.hpp> +#include <catch2/matchers/catch_matchers.hpp> +#include <catch2/matchers/catch_matchers_predicate.hpp> #include <iostream> @@ -30,12 +33,18 @@ foo f; // This test should not be run, because it won't be registered TEST_CASE( "Disabled Macros" ) { + CHECK( 1 == 2 ); + REQUIRE( 1 == 2 ); std::cout << "This should not happen\n"; FAIL(); // Test that static assertions don't fire when macros are disabled STATIC_CHECK( 0 == 1 ); STATIC_REQUIRE( !true ); + + REQUIRE_THAT( 1, + Catch::Matchers::Predicate( []( int ) { return false; } ) ); + BENCHMARK( "Disabled benchmark" ) { REQUIRE( 1 == 2 ); }; } #if defined(__clang__) |