Fixes failing test on Release build and Windows.
continuous-integration/drone/push Build is passing Details

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
Deukhoofd 2020-08-15 19:54:59 +02:00
parent 2b703954a5
commit 4c266bcd43
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
1 changed files with 8 additions and 0 deletions

View File

@ -19,8 +19,16 @@ TEST_CASE("When throwing exception, what() is readable", "[Utilities]") {
TEST_CASE("C Interface exception", "[Utilities]") {
ExceptionHandler::SetLastArbUtException("foo", ArbUt::Exception("foobar"), 1);
REQUIRE(std::string(ExceptionHandler::GetLastException()) == "[foo] foobar");
#if !WINDOWS
#ifndef DEBUG
REQUIRE(std::string(ExceptionHandler::GetLastExceptionStacktrace()) !=
"");
#else
REQUIRE(std::string(ExceptionHandler::GetLastExceptionStacktrace()) ==
"ExceptionTests.cpp[20] ____C_A_T_C_H____T_E_S_T____3()\n");
#endif
#endif
}
#endif