summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-10 12:37:46 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-15 09:45:55 -0700
commit9eba2a66d107f30aa9216fb34ed62df60797986a (patch)
treed334e6f3b5154b3dc5a49d87e8be9b42df2b212a /test
parente473f2dcceb31eda816ac9e6c972d7e0a8f1dceb (diff)
downloadqtlocation-mapboxgl-9eba2a66d107f30aa9216fb34ed62df60797986a.tar.gz
[core, node, darwin, qt] Remove support for paint classes
Diffstat (limited to 'test')
-rw-r--r--test/map/map.test.cpp34
-rw-r--r--test/style/conversion/layer.test.cpp14
2 files changed, 2 insertions, 46 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 6809fefb65..2b7c3c2e3d 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -439,40 +439,6 @@ TEST(Map, DisabledSources) {
test::checkImage("test/fixtures/map/disabled_layers/second", test::render(map, test.view));
}
-TEST(Map, Classes) {
- MapTest test;
-
- Map map(test.backend, test.view.getSize(), 1, test.fileSource, test.threadPool, MapMode::Still);
- map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
-
- EXPECT_FALSE(map.getTransitionOptions().duration);
-
- auto duration = mbgl::Duration(mbgl::Milliseconds(300));
- map.setTransitionOptions({ duration });
- EXPECT_EQ(map.getTransitionOptions().duration, duration);
-
- map.addClass("test");
- EXPECT_TRUE(map.hasClass("test"));
-
- map.removeClass("test");
- EXPECT_TRUE(map.getClasses().empty());
-
- std::vector<std::string> classes = { "foo", "bar" };
- map.setClasses(classes);
- EXPECT_FALSE(map.hasClass("test"));
- EXPECT_TRUE(map.hasClass("foo"));
- EXPECT_TRUE(map.hasClass("bar"));
-
- // Does nothing - same style JSON.
- map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
- EXPECT_TRUE(map.hasClass("foo"));
- EXPECT_EQ(map.getTransitionOptions().duration, duration);
-
- map.setStyleJSON(util::read_file("test/fixtures/api/water.json"));
- EXPECT_TRUE(map.getClasses().empty());
- EXPECT_FALSE(map.getTransitionOptions().duration);
-}
-
TEST(Map, AddImage) {
MapTest test;
diff --git a/test/style/conversion/layer.test.cpp b/test/style/conversion/layer.test.cpp
index 22be61e809..d51d7d33e2 100644
--- a/test/style/conversion/layer.test.cpp
+++ b/test/style/conversion/layer.test.cpp
@@ -27,21 +27,11 @@ TEST(StyleConversion, LayerTransition) {
"duration": 400,
"delay": 500
}
- },
- "paint.class": {
- "background-color-transition": {
- "duration": 100
- }
}
})JSON");
ASSERT_EQ(400ms, *layer->as<BackgroundLayer>()->impl().paint
- .get<BackgroundColor>().getTransition({}).duration);
+ .get<BackgroundColor>().options.duration);
ASSERT_EQ(500ms, *layer->as<BackgroundLayer>()->impl().paint
- .get<BackgroundColor>().getTransition({}).delay);
-
- ASSERT_EQ(100ms, *layer->as<BackgroundLayer>()->impl().paint
- .get<BackgroundColor>().getTransition({"class"}).duration);
- ASSERT_FALSE(bool(layer->as<BackgroundLayer>()->impl().paint
- .get<BackgroundColor>().getTransition({"class"}).delay));
+ .get<BackgroundColor>().options.delay);
}