Skip to content

Commit

Permalink
test: Check if removing null logger resolves crashes
Browse files Browse the repository at this point in the history
  • Loading branch information
fetzerch committed Feb 19, 2016
1 parent eeb809d commit e7bac52
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions xbmc/test/xbmc-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,29 +29,17 @@
#include <cstdio>
#include <cstdlib>

class NullLogger : public XbmcCommons::ILogger
{
public:
void log(int loglevel, const char* message) {}
};

int main(int argc, char **argv)
{
testing::InitGoogleTest(&argc, argv);
CXBMCTestUtils::Instance().ParseArgs(argc, argv);

// we need to configure CThread to use a dummy logger
NullLogger* nullLogger = new NullLogger();
CThread::SetLogger(nullLogger);

if (!testing::AddGlobalTestEnvironment(new TestBasicEnvironment()))
{
fprintf(stderr, "Unable to add basic test environment.\n");
exit(EXIT_FAILURE);
}
int ret = RUN_ALL_TESTS();

delete nullLogger;

return ret;
}

0 comments on commit e7bac52

Please sign in to comment.