first attempt at testing malformed style parsing

This commit is contained in:
Mike Morris
2014-07-07 17:25:15 -07:00
parent 9b61e39ef3
commit 6f112849be
6 changed files with 95 additions and 7 deletions

26
test/style.cpp Normal file
View File

@@ -0,0 +1,26 @@
#include "gtest/gtest.h"
#include <llmr/map/map.hpp>
#include "../common/headless_view.hpp"
#include <iostream>
#include <fstream>
using namespace llmr;
TEST(Style, Color) {
// Setup OpenGL
llmr::HeadlessView view;
llmr::Map map(view);
std::ifstream stylefile("./style-fuzzed.min.js");
ASSERT_TRUE(stylefile.good());
std::stringstream stylejson;
stylejson << stylefile.rdbuf();
map.setStyleJSON(stylejson.str());
// ASSERT_EQ(std::string(""), styles[0]->clip.mask);
// ASSERT_EQ(3, styles[0]->clip.length);
}