From bc30a9b8cda6e150ae77c8b0f4da24d1aae5b970 Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Mon, 7 Jul 2014 19:13:32 -0700 Subject: [PATCH] test Style.loadJSON directly, drop headless view --- test/style.cpp | 11 +++-------- test/test.gyp | 3 --- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/test/style.cpp b/test/style.cpp index bed8f38ff..a7e309c98 100644 --- a/test/style.cpp +++ b/test/style.cpp @@ -1,8 +1,6 @@ #include "gtest/gtest.h" -#include - -#include "../common/headless_view.hpp" +#include #include #include @@ -10,14 +8,11 @@ using namespace llmr; TEST(Style, Color) { - // Setup OpenGL - llmr::HeadlessView view; - llmr::Map map(view); - std::ifstream stylefile("./style-fuzzed.min.js"); ASSERT_FALSE(stylefile.good()); std::stringstream stylejson; stylejson << stylefile.rdbuf(); - map.setStyleJSON(stylejson.str()); + Style style; + style.loadJSON((const uint8_t *)stylejson.str().c_str()); } diff --git a/test/test.gyp b/test/test.gyp index 4174c6897..e3e08c3fd 100644 --- a/test/test.gyp +++ b/test/test.gyp @@ -95,13 +95,10 @@ "sources": [ "./main.cpp", "./style.cpp", - "../common/headless_view.hpp", - "../common/headless_view.cpp", ], "dependencies": [ "../deps/gtest/gtest.gyp:gtest", "../llmr.gyp:llmr-x86", - "link_gl", ] }, {