From d9badefb0754b5ea630894060994ab27afe9d4b3 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 15 Aug 2020 15:21:02 +0200 Subject: [PATCH] Update to latest CreatureLib. --- tests/ScriptTests/BaseScriptClassTests.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/ScriptTests/BaseScriptClassTests.cpp b/tests/ScriptTests/BaseScriptClassTests.cpp index 8465daf..59dae2e 100644 --- a/tests/ScriptTests/BaseScriptClassTests.cpp +++ b/tests/ScriptTests/BaseScriptClassTests.cpp @@ -344,10 +344,15 @@ TEST_CASE("Handle script exceptions.") { auto mainLib = TestLibrary::GetLibrary(); auto script = GetScript(mainLib, "throwScript"_cnc); REQUIRE(script != nullptr); - CHECK_THROWS_WITH( - TryException(script), - Catch::Matchers::Equals("Script exception in script 'throwScript', line 1. Message: 'test exception'.")); - delete script; + try{ + TryException(script); + } + catch (const ArbUt::Exception& e){ + REQUIRE(strcmp(e.what(), "Script exception in script 'throwScript', line 1. Message: 'test exception'.") == 0); + delete script; + return; + } + throw ArbUt::Exception("Didn't throw"); } #endif \ No newline at end of file