hook up style_parser to new log backend

This commit is contained in:
Mike Morris
2014-07-14 18:46:34 -04:00
parent 97ec376614
commit b327a2cb34
3 changed files with 57 additions and 49 deletions

View File

@@ -1,6 +1,7 @@
#include "gtest/gtest.h"
#include <llmr/style/style.hpp>
#include "./fixtures/fixture_log.hpp"
#include <iostream>
#include <fstream>
@@ -8,6 +9,7 @@
using namespace llmr;
TEST(Style, Style) {
const FixtureLogBackend &log = Log::Set<FixtureLogBackend>();
std::ifstream stylefile("./style.min.js");
ASSERT_TRUE(stylefile.good());
std::stringstream stylejson;
@@ -15,9 +17,11 @@ TEST(Style, Style) {
Style style;
style.loadJSON((const uint8_t *)stylejson.str().c_str());
// ASSERT_EQ(0, log.count({ EventSeverity::Warning, Event::ParseStyle }));
}
TEST(Style, Colors) {
const FixtureLogBackend &log = Log::Set<FixtureLogBackend>();
std::ifstream stylefile("./fuzz-colors.min.js");
ASSERT_TRUE(stylefile.good());
std::stringstream stylejson;
@@ -28,6 +32,7 @@ TEST(Style, Colors) {
}
TEST(Style, Functions) {
const FixtureLogBackend &log = Log::Set<FixtureLogBackend>();
std::ifstream stylefile("./fuzz-functions.min.js");
ASSERT_TRUE(stylefile.good());
std::stringstream stylejson;
@@ -38,6 +43,7 @@ TEST(Style, Functions) {
}
TEST(Style, Layers) {
const FixtureLogBackend &log = Log::Set<FixtureLogBackend>();
std::ifstream stylefile("./fuzz-layers.min.js");
ASSERT_TRUE(stylefile.good());
std::stringstream stylejson;