Remove test for a logging callback that goes out of scope

I've never understood why this appeared to work, but I've seen this test fail twice due to SEH exceptions in the past week, so it's better off removed. Nothing should be relying on this working (and LOOT doesn't).
This commit is contained in:
Oliver Hamlet
2025-01-31 18:06:17 +00:00
parent 6a32b63c6d
commit 0fd1b82fb4
-19
View File
@@ -81,25 +81,6 @@ TEST(SetLoggingCallback, shouldAcceptAMemberFunction) {
}
}
TEST(SetLoggingCallback,
shouldNotBreakLoggingIfPassedMemberFunctionGoesOutOfScope) {
{
TestLogger testLogger;
auto boundCallback = std::bind(&TestLogger::callback,
&testLogger,
std::placeholders::_1,
std::placeholders::_2);
SetLoggingCallback(boundCallback);
}
try {
CreateGameHandle(GameType::tes4, "dummy");
FAIL();
} catch (...) {
SetLoggingCallback([](LogLevel, const char *) {});
}
}
TEST(SetLoggingCallback, shouldAcceptALambdaFunction) {
std::string loggedMessages;
auto callback = [&](LogLevel, const char *string) {