From 88b28ab5926e341a57305a62339507a4189343ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 1 Jan 2022 23:21:31 +0100 Subject: [PATCH] Extra compilation checks for compiling without exceptions --- .../ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp b/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp index c981fa0b..fefbae0d 100644 --- a/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +++ b/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp @@ -1,4 +1,7 @@ #include +#include +#include +#include TEST_CASE("Tests that run") { // All of these should be run and be reported @@ -20,3 +23,9 @@ TEST_CASE("Tests that abort") { // We should not get here, because the test above aborts REQUIRE(1 != 4); } + +TEST_CASE( "Misc. macros to check that they compile without exceptions" ) { + BENCHMARK( "simple benchmark" ) { return 1 * 2 + 3; }; + REQUIRE_THAT( 1, + Catch::Matchers::Predicate( []( int i ) { return i == 1; } ) ); +}