summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-02 16:18:46 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-02 16:33:56 -0700
commite802aedb8cf7678cacb92cd02e2e35d051310252 (patch)
tree623492c0835899bcd473b071720cc5b2bde1c76f /test
parent7d110f5b149bfd78eca8a2e3e0cb071ae5027348 (diff)
downloadqtlocation-mapboxgl-e802aedb8cf7678cacb92cd02e2e35d051310252.tar.gz
[core, node, android] Remove used "base" parameter from setStyleJSON
Diffstat (limited to 'test')
-rw-r--r--test/api/annotations.cpp28
-rw-r--r--test/api/custom_layer.cpp2
-rw-r--r--test/api/render_missing.cpp2
-rw-r--r--test/api/repeated_render.cpp4
-rw-r--r--test/api/set_style.cpp2
-rw-r--r--test/map/map.cpp8
-rw-r--r--test/style/style.cpp6
7 files changed, 26 insertions, 26 deletions
diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp
index ce5aaa8607..60d7db6baa 100644
--- a/test/api/annotations.cpp
+++ b/test/api/annotations.cpp
@@ -37,7 +37,7 @@ public:
TEST(Annotations, SymbolAnnotation) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
test.map.addAnnotation(SymbolAnnotation { Point<double>(0, 0), "default_marker" });
test.checkRendering("point_annotation");
@@ -51,7 +51,7 @@ TEST(Annotations, LineAnnotation) {
annotation.color = {{ 255, 0, 0, 1 }};
annotation.width = 5;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotation(annotation);
test.checkRendering("line_annotation");
}
@@ -63,7 +63,7 @@ TEST(Annotations, FillAnnotation) {
FillAnnotation annotation { polygon };
annotation.color = {{ 255, 0, 0, 1 }};
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotation(annotation);
test.checkRendering("fill_annotation");
}
@@ -73,7 +73,7 @@ TEST(Annotations, StyleSourcedShapeAnnotation) {
Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
- test.map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"));
test.map.addAnnotation(StyleSourcedAnnotation { polygon, "annotation" });
test.checkRendering("style_sourced_shape_annotation");
}
@@ -81,7 +81,7 @@ TEST(Annotations, StyleSourcedShapeAnnotation) {
TEST(Annotations, AddMultiple) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
test.map.addAnnotation(SymbolAnnotation { Point<double> { -10, 0 }, "default_marker" });
@@ -94,7 +94,7 @@ TEST(Annotations, AddMultiple) {
TEST(Annotations, NonImmediateAdd) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test::render(test.map);
Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
@@ -108,7 +108,7 @@ TEST(Annotations, NonImmediateAdd) {
TEST(Annotations, UpdateIcon) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("flipped_marker", namedMarker("default_marker.png"));
test.map.addAnnotation(SymbolAnnotation { Point<double> { 0, 0 }, "flipped_marker" });
@@ -124,7 +124,7 @@ TEST(Annotations, UpdateIcon) {
TEST(Annotations, UpdatePoint) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
test.map.addAnnotationIcon("flipped_marker", namedMarker("flipped_marker.png"));
AnnotationID point = test.map.addAnnotation(SymbolAnnotation { Point<double> { 0, 0 }, "default_marker" });
@@ -138,7 +138,7 @@ TEST(Annotations, UpdatePoint) {
TEST(Annotations, RemovePoint) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
AnnotationID point = test.map.addAnnotation(SymbolAnnotation { Point<double> { 0, 0 }, "default_marker" });
@@ -156,7 +156,7 @@ TEST(Annotations, RemoveShape) {
annotation.color = {{ 255, 0, 0, 1 }};
annotation.width = 5;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
AnnotationID shape = test.map.addAnnotation(annotation);
test::render(test.map);
@@ -169,7 +169,7 @@ TEST(Annotations, ImmediateRemoveShape) {
AnnotationTest test;
test.map.removeAnnotation(test.map.addAnnotation(LineAnnotation { LineString<double>() }));
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test::render(test.map);
}
@@ -177,20 +177,20 @@ TEST(Annotations, ImmediateRemoveShape) {
TEST(Annotations, SwitchStyle) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
test.map.addAnnotation(SymbolAnnotation { Point<double> { 0, 0 }, "default_marker" });
test::render(test.map);
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.checkRendering("switch_style");
}
TEST(Annotations, QueryRenderedFeatures) {
AnnotationTest test;
- test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test.map.addAnnotationIcon("default_marker", namedMarker("default_marker.png"));
test.map.addAnnotation(SymbolAnnotation { Point<double> { 0, 0 }, "default_marker" });
diff --git a/test/api/custom_layer.cpp b/test/api/custom_layer.cpp
index c805df5566..e0be341c4b 100644
--- a/test/api/custom_layer.cpp
+++ b/test/api/custom_layer.cpp
@@ -77,7 +77,7 @@ TEST(CustomLayer, Basic) {
StubFileSource fileSource;
Map map(view, fileSource, MapMode::Still);
- map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
map.addLayer(std::make_unique<CustomLayer>(
"custom",
[] (void* context) {
diff --git a/test/api/render_missing.cpp b/test/api/render_missing.cpp
index c1cc3fac35..e0fb8e4c55 100644
--- a/test/api/render_missing.cpp
+++ b/test/api/render_missing.cpp
@@ -40,7 +40,7 @@ TEST(API, TEST_REQUIRES_SERVER(RenderMissingTile)) {
std::string message;
// This host does not respond (== connection error).
- map.setStyleJSON(style, "");
+ map.setStyleJSON(style);
map.renderStill([&](std::exception_ptr err, PremultipliedImage&&) {
ASSERT_TRUE(err.operator bool());
try {
diff --git a/test/api/repeated_render.cpp b/test/api/repeated_render.cpp
index cf5d115997..3a71ddb08d 100644
--- a/test/api/repeated_render.cpp
+++ b/test/api/repeated_render.cpp
@@ -32,7 +32,7 @@ TEST(API, RepeatedRender) {
Map map(view, fileSource, MapMode::Still);
{
- map.setStyleJSON(style, "");
+ map.setStyleJSON(style);
PremultipliedImage result;
map.renderStill([&result](std::exception_ptr, PremultipliedImage&& image) {
result = std::move(image);
@@ -50,7 +50,7 @@ TEST(API, RepeatedRender) {
}
{
- map.setStyleJSON(style, "");
+ map.setStyleJSON(style);
PremultipliedImage result;
map.renderStill([&result](std::exception_ptr, PremultipliedImage&& image) {
result = std::move(image);
diff --git a/test/api/set_style.cpp b/test/api/set_style.cpp
index f9beb53871..fb5027c076 100644
--- a/test/api/set_style.cpp
+++ b/test/api/set_style.cpp
@@ -21,7 +21,7 @@ TEST(API, SetStyle) {
{
Map map(view, fileSource, MapMode::Still);
- map.setStyleJSON("invalid", "");
+ map.setStyleJSON("invalid");
}
auto observer = Log::removeObserver();
diff --git a/test/map/map.cpp b/test/map/map.cpp
index 7cafe563b4..57adee567d 100644
--- a/test/map/map.cpp
+++ b/test/map/map.cpp
@@ -56,15 +56,15 @@ TEST(Map, DoubleStyleLoad) {
MapTest test;
Map map(test.view, test.fileSource, MapMode::Still);
- map.setStyleJSON("", "");
- map.setStyleJSON("", "");
+ map.setStyleJSON("");
+ map.setStyleJSON("");
}
TEST(Map, AddLayer) {
MapTest test;
Map map(test.view, test.fileSource, MapMode::Still);
- map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
auto layer = std::make_unique<BackgroundLayer>("background");
layer->setBackgroundColor({{{ 1, 0, 0, 1 }}});
@@ -77,7 +77,7 @@ TEST(Map, RemoveLayer) {
MapTest test;
Map map(test.view, test.fileSource, MapMode::Still);
- map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
+ map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
auto layer = std::make_unique<BackgroundLayer>("background");
layer->setBackgroundColor({{{ 1, 0, 0, 1 }}});
diff --git a/test/style/style.cpp b/test/style/style.cpp
index 931867978e..d530d9cbdd 100644
--- a/test/style/style.cpp
+++ b/test/style/style.cpp
@@ -16,7 +16,7 @@ TEST(Style, UnusedSource) {
auto now = Clock::now();
- style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"), "");
+ style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"));
style.cascade(now, MapMode::Still);
style.recalculate(0, now, MapMode::Still);
@@ -35,7 +35,7 @@ TEST(Style, UnusedSourceActiveViaClassUpdate) {
StubFileSource fileSource;
Style style { fileSource, 1.0 };
- style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"), "");
+ style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"));
EXPECT_TRUE(style.addClass("visible"));
EXPECT_TRUE(style.hasClass("visible"));
@@ -49,7 +49,7 @@ TEST(Style, UnusedSourceActiveViaClassUpdate) {
EXPECT_TRUE(unusedSource->isLoaded());
// Style classes should be cleared upon new style load.
- style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"), "");
+ style.setJSON(util::read_file("test/fixtures/resources/style-unused-sources.json"));
EXPECT_FALSE(style.hasClass("visible"));
now = Clock::now();