summaryrefslogtreecommitdiff
path: root/test/style/style_layer.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-06-22 12:31:49 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-24 09:39:15 -0700
commitc4e4cc5081965d03132eea754c27ece3c95961cb (patch)
tree3aa4f722ead3273b1faaed5f30449bb8654cf23d /test/style/style_layer.cpp
parent089c4e413fbe80711ebd874520d3b8fdcb997112 (diff)
downloadqtlocation-mapboxgl-c4e4cc5081965d03132eea754c27ece3c95961cb.tar.gz
[core] Adjust layer source properties to better reflect reality
* Layer source ID is immutable; must be provided to the constructor * Layer source layer is mutable * Layers with GeoJSON sources do not have a source layer While here, make Layer::copy impl-private.
Diffstat (limited to 'test/style/style_layer.cpp')
-rw-r--r--test/style/style_layer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/test/style/style_layer.cpp b/test/style/style_layer.cpp
index 3274131966..9c6a6e924a 100644
--- a/test/style/style_layer.cpp
+++ b/test/style/style_layer.cpp
@@ -55,12 +55,12 @@ const auto duration = PropertyValue<float> { 1.0f };
TEST(Layer, Clone) {
testClone<BackgroundLayer>("background");
- testClone<CircleLayer>("circle");
+ testClone<CircleLayer>("circle", "source");
testClone<CustomLayer>("custom", [](void*){}, [](void*, const CustomLayerRenderParameters&){}, [](void*){}, nullptr),
- testClone<FillLayer>("fill");
- testClone<LineLayer>("line");
- testClone<RasterLayer>("raster");
- testClone<SymbolLayer>("symbol");
+ testClone<FillLayer>("fill", "source");
+ testClone<LineLayer>("line", "source");
+ testClone<RasterLayer>("raster", "source");
+ testClone<SymbolLayer>("symbol", "source");
}
TEST(Layer, BackgroundProperties) {
@@ -80,7 +80,7 @@ TEST(Layer, BackgroundProperties) {
}
TEST(Layer, CircleProperties) {
- auto layer = std::make_unique<CircleLayer>("circle");
+ auto layer = std::make_unique<CircleLayer>("circle", "source");
EXPECT_TRUE(layer->is<CircleLayer>());
// Paint properties
@@ -105,7 +105,7 @@ TEST(Layer, CircleProperties) {
}
TEST(Layer, FillProperties) {
- auto layer = std::make_unique<FillLayer>("fill");
+ auto layer = std::make_unique<FillLayer>("fill", "source");
EXPECT_TRUE(layer->is<FillLayer>());
// Paint properties
@@ -133,7 +133,7 @@ TEST(Layer, FillProperties) {
}
TEST(Layer, LineProperties) {
- auto layer = std::make_unique<LineLayer>("line");
+ auto layer = std::make_unique<LineLayer>("line", "source");
EXPECT_TRUE(layer->is<LineLayer>());
// Layout properties
@@ -184,7 +184,7 @@ TEST(Layer, LineProperties) {
}
TEST(Layer, RasterProperties) {
- auto layer = std::make_unique<RasterLayer>("raster");
+ auto layer = std::make_unique<RasterLayer>("raster", "source");
EXPECT_TRUE(layer->is<RasterLayer>());
// Paint properties