Throw all exceptions with Arbutils exception.
This commit is contained in:
@@ -8,8 +8,14 @@ TEST_CASE("Assert succeeds if true", "[Utilities]") { REQUIRE_NOTHROW(TestWrappe
|
||||
TEST_CASE("Assert throws if false", "[Utilities]") { REQUIRE_THROWS(TestWrapper(false)); }
|
||||
|
||||
TEST_CASE("Assert throws if false with message", "[Utilities]") {
|
||||
REQUIRE_THROWS_WITH(TestWrapper(false),
|
||||
Catch::Matchers::Equals("ASSERTION FAILED: [AssertTests.cpp (3)] \"wrapperExpression\""));
|
||||
try {
|
||||
TestWrapper(false);
|
||||
}
|
||||
catch (const ArbUt::Exception& e) {
|
||||
REQUIRE(strcmp(e.what(), "ASSERTION FAILED: [AssertTests.cpp (3)] \"wrapperExpression\"") == 0);
|
||||
return;
|
||||
}
|
||||
throw ArbUt::Exception("Didn't throw.");
|
||||
}
|
||||
|
||||
TEST_CASE("Multiple asserts", "[Utilities]") {
|
||||
|
||||
Reference in New Issue
Block a user