diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-08-15 23:01:51 +0300 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-08-15 23:01:51 +0300 |
commit | 81113de9d1c787a66f0e1fecb141e2b8936d45e9 (patch) | |
tree | e744d4a1639057095d4712be216ada001d9a9ed8 /test/style/filter.test.cpp | |
parent | 1cb30268d7d0581bb1964cc7ccd310153ca50fca (diff) | |
download | qtlocation-mapboxgl-81113de9d1c787a66f0e1fecb141e2b8936d45e9.tar.gz |
[core] Check type of a convertible value when constructing legacy filterupstream/alexshalamov_fix_15388
Diffstat (limited to 'test/style/filter.test.cpp')
-rw-r--r-- | test/style/filter.test.cpp | 7 |
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); +} |