Skip to content

Commit

Permalink
Remove test for a logging callback that goes out of scope
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
Ortham committed Jan 30, 2025
1 parent b1dc608 commit a5e045e
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/tests/api/interface/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a5e045e

Please sign in to comment.