load stylesheet file for headless test

This commit is contained in:
Konstantin Käfer
2014-06-03 18:10:53 +02:00
parent e105e256be
commit 08fc466107

View File

@@ -1,9 +1,5 @@
#include <iostream>
#include "gtest/gtest.h"
#include <llmr/llmr.hpp>
#include <llmr/util/image.hpp>
#include <llmr/util/io.hpp>
@@ -11,6 +7,11 @@
#include <uv.h>
#include <iostream>
#include <fstream>
#include <sstream>
namespace llmr {
namespace platform {
@@ -113,6 +114,13 @@ TEST(Headless, initialize) {
map.resize(width, height);
std::ifstream stylefile("./style.min.js");
ASSERT_TRUE(stylefile.good());
std::stringstream stylejson;
stylejson << stylefile.rdbuf();
map.setStyleJSON(stylejson.str());
timer.report("map resize");
// Run the loop. It will terminate when we don't have any further listeners.