summaryrefslogtreecommitdiff
path: root/test/style
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-08-15 23:01:51 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-08-16 00:19:30 +0300
commit5f477e310b286d1bb8c5d238376d45ec58aa3fc4 (patch)
tree20d2e16d9fa5c70811ee89e01262a5d4304ed84a /test/style
parent8e1bd18eae73ffbe14aa9297a039e2431d40bd36 (diff)
downloadqtlocation-mapboxgl-5f477e310b286d1bb8c5d238376d45ec58aa3fc4.tar.gz
[core] Check type of a convertible value when constructing legacy filterupstream/node-release
Diffstat (limited to 'test/style')
-rw-r--r--test/style/filter.test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/style/filter.test.cpp b/test/style/filter.test.cpp
index 40219108bb..f3f5b52141 100644
--- a/test/style/filter.test.cpp
+++ b/test/style/filter.test.cpp
@@ -255,3 +255,10 @@ TEST(Filter, Internal) {
TEST(Filter, Short) {
filter(R"(["==", ["id"], "foo"])");
}
+
+TEST(Filter, LegacyExpressionInvalidType) {
+ const JSValue value("string");
+ conversion::Error error;
+ optional<Filter> result = conversion::convert<Filter>(conversion::Convertible(&value), error);
+ EXPECT_FALSE(result);
+}