Add option to get depth of stack trace.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-08-15 13:48:34 +02:00
parent f29e111b78
commit 5ac7654be1
2 changed files with 4 additions and 9 deletions

View File

@@ -8,13 +8,8 @@ TEST_CASE("Throw exception, get stack trace") {
throw ArbUt::Exception("foobar");
}
catch (const ArbUt::Exception& e) {
REQUIRE(e.GetStacktrace() ==
"ExceptionTests.cpp[8] ____C_A_T_C_H____T_E_S_T____0()\n"
"catch.hpp[14036] Catch::TestInvokerAsFunction::invoke() const\n"
"catch.hpp[13929] Catch::TestCase::invoke() const\n"
"catch.hpp[12791] Catch::RunContext::invokeActiveTestCase()\n"
"catch.hpp[12756] Catch::RunContext::runCurrentTest(std::__cxx11::basic_string<char, ...\n"
"catch.hpp[12525] Catch::RunContext::runTest(Catch::TestCase const&)\n");
REQUIRE(e.GetStacktrace(1) ==
"ExceptionTests.cpp[8] ____C_A_T_C_H____T_E_S_T____0()\n");
}
}