Better handling for Exception stack trace testing.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-08-15 13:59:10 +02:00
parent 5ac7654be1
commit 1dee4cd4a8
2 changed files with 22 additions and 6 deletions

View File

@@ -8,8 +8,13 @@ TEST_CASE("Throw exception, get stack trace") {
throw ArbUt::Exception("foobar");
}
catch (const ArbUt::Exception& e) {
#ifndef NDEBUG
REQUIRE(e.GetStacktrace(1) ==
"ExceptionTests.cpp[8] ____C_A_T_C_H____T_E_S_T____0()\n");
#else
REQUIRE(e.GetStacktrace(1, false) ==
"ArbutilsTests Catch::RunContext::runTest(Catch::TestCase const&)\n");
#endif
}
}