Update the FixtureLog
Now the FixtureLog is an Log::Observer instead of a backend. The observer can sniff and filter log messages, that can be used for fail a test if it emits a warning for example.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "../fixtures/util.hpp"
|
||||
#include "../fixtures/fixture_log.hpp"
|
||||
#include "../fixtures/fixture_log_observer.hpp"
|
||||
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/util/image.hpp>
|
||||
@@ -101,7 +101,7 @@ TEST_P(HeadlessTest, render) {
|
||||
ASSERT_FALSE(infoDoc.HasParseError());
|
||||
ASSERT_TRUE(infoDoc.IsObject());
|
||||
|
||||
Log::Set<FixtureLogBackend>();
|
||||
Log::setObserver(util::make_unique<FixtureLogObserver>());
|
||||
|
||||
Log::Info(Event::General, "test fixture %s", base.c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user