From ca5b36ba80312766b694dabb32f8788125bff8ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Fri, 29 Jun 2018 11:47:03 -0700 Subject: [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. --- test/style/filter.test.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test') 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"])"); +} -- cgit v1.2.1