From 0fd1b82fb44580b8adc2ed6878a721408c15a061 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Thu, 30 Jan 2025 19:07:13 +0000 Subject: [PATCH] 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). --- src/tests/api/interface/main.cpp | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/src/tests/api/interface/main.cpp b/src/tests/api/interface/main.cpp index 6d96e418..405173f4 100644 --- a/src/tests/api/interface/main.cpp +++ b/src/tests/api/interface/main.cpp @@ -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) {