From c29883bb54205401e3ecce53018d49f9983e1eb6 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Tue, 15 Jul 2014 11:42:26 -0400 Subject: [PATCH] why u no write to FixtureLogBackend? --- test/style.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/test/style.cpp b/test/style.cpp index ee59b26f6..cadfec812 100644 --- a/test/style.cpp +++ b/test/style.cpp @@ -10,6 +10,7 @@ using namespace llmr; TEST(Style, Style) { const FixtureLogBackend &log = Log::Set(); + std::ifstream stylefile("./style.min.js"); ASSERT_TRUE(stylefile.good()); std::stringstream stylejson; @@ -17,11 +18,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(); + std::ifstream stylefile("./fuzz-colors.min.js"); ASSERT_TRUE(stylefile.good()); std::stringstream stylejson; @@ -33,6 +34,7 @@ TEST(Style, Colors) { TEST(Style, Functions) { const FixtureLogBackend &log = Log::Set(); + std::ifstream stylefile("./fuzz-functions.min.js"); ASSERT_TRUE(stylefile.good()); std::stringstream stylejson; @@ -40,10 +42,19 @@ TEST(Style, Functions) { Style style; style.loadJSON((const uint8_t *)stylejson.str().c_str()); + + const FixtureLogBackend::LogMessage number { + EventSeverityClass("WARNING"), + EventClass("ParseStyle"), + "value of 'line-width' must be a number, or a number function" + }; + + ASSERT_EQ(0, log.count(number)); } TEST(Style, Layers) { const FixtureLogBackend &log = Log::Set(); + std::ifstream stylefile("./fuzz-layers.min.js"); ASSERT_TRUE(stylefile.good()); std::stringstream stylejson;