summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-26 17:58:58 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-27 13:08:53 +0300
commit5304bbc438afd60853c97d74cd38f04a50effa06 (patch)
tree916119557766873a5a83baf8068b8b9bb9e5e0a6 /test
parentf3146e43cd19bdf85957d6d62132ac7c31eacc50 (diff)
downloadqtlocation-mapboxgl-5304bbc438afd60853c97d74cd38f04a50effa06.tar.gz
[core] Layer::getProperty supports layout properties
Diffstat (limited to 'test')
-rw-r--r--test/map/map.test.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 7293c1c6ca..5872f4ecd5 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -946,6 +946,9 @@ TEST(Map, UniversalStyleGetter) {
"line-color": "red",
"line-opacity": 0.5,
"line-width": ["get", "width"]
+ },
+ "layout": {
+ "line-cap": "butt"
}
}]
})STYLE");
@@ -999,4 +1002,10 @@ TEST(Map, UniversalStyleGetter) {
EXPECT_EQ("get", *operation[0].getString());
ASSERT_TRUE(operation[1].getString());
EXPECT_EQ("width", *operation[1].getString());
+
+ StyleProperty lineCap = lineLayer->getProperty("line-cap");
+ ASSERT_TRUE(lineCap.value);
+ EXPECT_EQ(StyleProperty::Kind::Constant, lineCap.kind);
+ ASSERT_TRUE(lineCap.value.getInt());
+ EXPECT_EQ(mbgl::underlying_type(mbgl::style::LineCapType::Butt), *lineCap.value.getInt());
} \ No newline at end of file