From 4c266bcd43cf517f326a433633deb53cb83d7506 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 15 Aug 2020 19:54:59 +0200 Subject: [PATCH] Fixes failing test on Release build and Windows. Signed-off-by: Deukhoofd --- tests/ExceptionTests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ExceptionTests.cpp b/tests/ExceptionTests.cpp index f1a7d62..a3f0ea2 100644 --- a/tests/ExceptionTests.cpp +++ b/tests/ExceptionTests.cpp @@ -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 \ No newline at end of file