summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnsis Brammanis <brammanis@gmail.com>2015-02-06 10:11:27 -0800
committerAnsis Brammanis <brammanis@gmail.com>2015-02-06 10:11:27 -0800
commit177f441cc990f3bbf4cc306a936dfe8a8212445d (patch)
treea218671c73a3be1940b5ccab381640134bf1c22e /test
parent5eb08baf14f2eda6ea860f4d0957c4eec672edec (diff)
downloadqtlocation-mapboxgl-177f441cc990f3bbf4cc306a936dfe8a8212445d.tar.gz
add test for parsing enum, bool, string functions.
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/style_parser/function-string-bool-enum.info.json6
-rw-r--r--test/fixtures/style_parser/function-string-bool-enum.style.json43
2 files changed, 49 insertions, 0 deletions
diff --git a/test/fixtures/style_parser/function-string-bool-enum.info.json b/test/fixtures/style_parser/function-string-bool-enum.info.json
new file mode 100644
index 0000000000..9c25a2f488
--- /dev/null
+++ b/test/fixtures/style_parser/function-string-bool-enum.info.json
@@ -0,0 +1,6 @@
+{
+ "default": {
+ "log": [
+ ]
+ }
+}
diff --git a/test/fixtures/style_parser/function-string-bool-enum.style.json b/test/fixtures/style_parser/function-string-bool-enum.style.json
new file mode 100644
index 0000000000..c38f195259
--- /dev/null
+++ b/test/fixtures/style_parser/function-string-bool-enum.style.json
@@ -0,0 +1,43 @@
+{
+ "version": 6,
+ "sources": {
+ "mapbox": {
+ "type": "vector",
+ "url": "mapbox://mapbox.mapbox-terrain-v1,mapbox.mapbox-streets-v5",
+ "maxzoom": 14
+ }
+ },
+ "layers": [{
+ "id": "waterway_river_canal",
+ "type": "line",
+ "source": "mapbox",
+ "source-layer": "waterway",
+ "filter": ["in", "type", "river", "canal"],
+ "layout": {
+ "line-cap": {
+ "stops": [[0, "round"], [10, "round"]]
+ }
+ },
+ "paint": {
+ "line-translate-anchor": {
+ "stops": [[0, "map"], [10, "viewport"]]
+ }
+ }
+ },
+ {
+ "id": "label",
+ "type": "symbol",
+ "source": "mapbox",
+ "source-layer": "waterway",
+ "layout": {
+ "text-font": {
+ "stops": [[0, "Open Sans Regular"]]
+ },
+ "text-keep-upright": {
+ "stops": [[0, false], [10, true]]
+ }
+ },
+ "paint": {
+ }
+ }]
+}