summaryrefslogtreecommitdiff
path: root/test/headless.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-06-03 18:10:53 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-06-03 18:10:53 +0200
commit08fc46610768929c7ada06c0810da90b9a1eba74 (patch)
treedb02e70c376a9836fc90bd92be506b3d441377d4 /test/headless.cpp
parente105e256bef603af2d3133e7cca9f083a1e599b2 (diff)
downloadqtlocation-mapboxgl-08fc46610768929c7ada06c0810da90b9a1eba74.tar.gz
load stylesheet file for headless test
Diffstat (limited to 'test/headless.cpp')
-rw-r--r--test/headless.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/test/headless.cpp b/test/headless.cpp
index af34f4e19f..8c1dc3a260 100644
--- a/test/headless.cpp
+++ b/test/headless.cpp
@@ -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.