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:
Thiago Marcos P. Santos
2015-03-10 16:13:53 +02:00
parent 51bc265db3
commit 79f3149d9d
9 changed files with 152 additions and 157 deletions

View File

@@ -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());