From 5f477e310b286d1bb8c5d238376d45ec58aa3fc4 Mon Sep 17 00:00:00 2001 From: Alexander Shalamov Date: Thu, 15 Aug 2019 23:01:51 +0300 Subject: [core] Check type of a convertible value when constructing legacy filter --- test/style/filter.test.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/style') 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 result = conversion::convert(conversion::Convertible(&value), error); + EXPECT_FALSE(result); +} -- cgit v1.2.1