1 /*
2  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
3  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
4  */
5 
6 #include "catch.hpp"
7 
8 #if defined(_MSC_VER)
9 #pragma warning(push)
10 #pragma warning(disable:4702) // unreachable code in the macro expansions
11 #endif
12 
13 TEST_CASE("Check that our error handling macros throw the right exceptions", "[!throws][internals][approvals]") {
14     REQUIRE_THROWS_AS(CATCH_INTERNAL_ERROR(""), std::logic_error);
15     REQUIRE_THROWS_AS(CATCH_ERROR(""), std::domain_error);
16     REQUIRE_THROWS_AS(CATCH_RUNTIME_ERROR(""), std::runtime_error);
__anon57eac7a30102()17     REQUIRE_THROWS_AS([](){CATCH_ENFORCE(false, "");}(), std::domain_error);
__anon57eac7a30202()18     REQUIRE_NOTHROW([](){CATCH_ENFORCE(true, "");}());
19 }
20 
21 #if defined(_MSC_VER)
22 #pragma warning(pop) // unreachable code in the macro expansions
23 #endif
24