summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-06-29 11:47:03 -0700
committerKonstantin Käfer <mail@kkaefer.com>2018-06-29 12:14:51 -0700
commitca5b36ba80312766b694dabb32f8788125bff8ae (patch)
treeb67477c6ad2be6cc89757c490af70a203a82ce81 /test
parent789baf4c1f252071bf58e689e050b34eb2656363 (diff)
downloadqtlocation-mapboxgl-ca5b36ba80312766b694dabb32f8788125bff8ae.tar.gz
[core] fix crash when trying to parse legacy filters
Legacy filters aren't part of the style specification, but you can generate them by parsing a legacy filter in a stylesheet, and obtaining the parsed Filter and serializing it.
Diffstat (limited to 'test')
-rw-r--r--test/style/filter.test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/style/filter.test.cpp b/test/style/filter.test.cpp
index c8f1d3b808..bac3801223 100644
--- a/test/style/filter.test.cpp
+++ b/test/style/filter.test.cpp
@@ -192,3 +192,7 @@ TEST(Filter, ZoomExpressionNested) {
ASSERT_TRUE(filter(R"(["==", ["get", "two"], ["zoom"]])", {{"two", int64_t(2)}}, {}, FeatureType::Point, {}, 2.0f));
ASSERT_FALSE(filter(R"(["==", ["get", "two"], ["+", ["zoom"], 1]])", {{"two", int64_t(2)}}, {}, FeatureType::Point, {}, 2.0f));
}
+
+TEST(Filter, Internal) {
+ filter(R"(["filter-==","class","snow"])");
+}