From 3b474ce3cf55179996b73ad6b1c0b43a836a1d5b Mon Sep 17 00:00:00 2001 From: davidmatson Date: Wed, 26 Oct 2022 16:56:27 -0700 Subject: [PATCH] Add coverage for CATCH_SYSTEM_ERROR. --- tests/SelfTest/IntrospectiveTests/Details.tests.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp index 987910a9..34b6ecf3 100644 --- a/tests/SelfTest/IntrospectiveTests/Details.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Details.tests.cpp @@ -20,6 +20,7 @@ TEST_CASE("Check that our error handling macros throw the right exceptions", "[! REQUIRE_THROWS_AS(CATCH_INTERNAL_ERROR(""), std::logic_error); REQUIRE_THROWS_AS(CATCH_ERROR(""), std::domain_error); REQUIRE_THROWS_AS(CATCH_RUNTIME_ERROR(""), std::runtime_error); + REQUIRE_THROWS_AS(CATCH_SYSTEM_ERROR(0, std::generic_category()), std::system_error); REQUIRE_THROWS_AS([](){CATCH_ENFORCE(false, "");}(), std::domain_error); REQUIRE_NOTHROW([](){CATCH_ENFORCE(true, "");}()); }