[K/N] Fix set_terminate usage in ExceptionsTest.cpp

Merge-request: KT-MR-5376
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
Alexander Shabalin
2021-12-29 12:58:35 +00:00
committed by Space
parent 353593fa77
commit 3fe05233e2
@@ -162,6 +162,7 @@ TEST(ExceptionDeathTest, TerminateHandler_WithHook) {
konan::consoleErrorf("Unknown Exception\n");
}
}
std::abort();
});
// The termination handler will check the initialization of the whole runtime, so we cannot use RunInNewThread here.
// This call also sets the K/N termination handler.
@@ -203,6 +204,7 @@ TEST(ExceptionDeathTest, TerminateHandler_NoHook) {
konan::consoleErrorf("Unknown Exception\n");
}
}
std::abort();
});
// The termination handler will check the initialization of the whole runtime, so we cannot use RunInNewThread here.
// This call also sets the K/N termination handler.
@@ -246,6 +248,7 @@ TEST(ExceptionDeathTest, TerminateHandler_WithFailingHook) {
konan::consoleErrorf("Unknown Exception\n");
}
}
std::abort();
});
// The termination handler will check the initialization of the whole runtime, so we cannot use RunInNewThread here.
// This call also sets the K/N termination handler.
@@ -283,6 +286,7 @@ TEST(ExceptionDeathTest, TerminateHandler_IgnoreHooks) {
konan::consoleErrorf("Unknown Exception\n");
}
}
std::abort();
});
SetKonanTerminateHandler();
try {
@@ -526,4 +530,4 @@ TEST(TerminationThreadStateDeathTest, TerminationInForeignExceptionCatch) {
};
EXPECT_DEATH(testBlock(), AllOf(ASSERTS_PASSED, NATIVE_HANDLER_RAN, Not(KOTLIN_HANDLER_RAN)));
}
}