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

summaryrefslogtreecommitdiffhomepage
path: root/tests/ExtraTests
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-01-01 23:21:31 +0100
committerMartin Hořeňovský2022-01-01 23:21:37 +0100
commit88b28ab5926e341a57305a62339507a4189343ca (patch)
tree64249a3f83e0edd312638e6c90b9286eb5468012 /tests/ExtraTests
parentef3374ed813590525527f229994b58c094e9c12e (diff)
downloadcatch3-88b28ab5926e341a57305a62339507a4189343ca.tar.gz
Extra compilation checks for compiling without exceptions
Diffstat (limited to 'tests/ExtraTests')
-rw-r--r--tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp9
1 files changed, 9 insertions, 0 deletions
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 <catch2/catch_test_macros.hpp>
+#include <catch2/benchmark/catch_benchmark.hpp>
+#include <catch2/matchers/catch_matchers.hpp>
+#include <catch2/matchers/catch_matchers_predicate.hpp>
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>( []( int i ) { return i == 1; } ) );
+}