diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2018-07-31 14:21:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 14:21:47 -0700 |
commit | 9bdd765a02de75851a00ab85223d5d582a104757 (patch) | |
tree | bcb417a47808a4a94c171b083c7f2e2cce457107 /test/style/conversion | |
parent | 885f6e3c02138398d094e49243817a83349b4d50 (diff) | |
download | qtlocation-mapboxgl-9bdd765a02de75851a00ab85223d5d582a104757.tar.gz |
[core] Merge DataDrivenPropertyValue into PropertyValue (#12513)
Diffstat (limited to 'test/style/conversion')
-rw-r--r-- | test/style/conversion/function.test.cpp | 7 | ||||
-rw-r--r-- | test/style/conversion/property_value.test.cpp | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/test/style/conversion/function.test.cpp b/test/style/conversion/function.test.cpp index 4612147f76..e63ad722cf 100644 --- a/test/style/conversion/function.test.cpp +++ b/test/style/conversion/function.test.cpp @@ -3,7 +3,6 @@ #include <mbgl/style/conversion/json.hpp> #include <mbgl/style/conversion/constant.hpp> #include <mbgl/style/conversion/property_value.hpp> -#include <mbgl/style/conversion/data_driven_property_value.hpp> #include <mbgl/style/expression/dsl.hpp> using namespace mbgl; @@ -14,7 +13,7 @@ TEST(StyleConversion, Function) { Error error; auto parseFunction = [&](const std::string& json) { - return convertJSON<PropertyValue<float>>(json, error); + return convertJSON<PropertyValue<float>>(json, error, false, false); }; auto fn1 = parseFunction(R"({"stops":[]})"); @@ -57,12 +56,12 @@ TEST(StyleConversion, CompositeFunctionExpression) { Error error; auto parseFunction = [&](const std::string& json) { - return convertJSON<DataDrivenPropertyValue<float>>(json, error, false); + return convertJSON<PropertyValue<float>>(json, error, true, false); }; auto fn1 = parseFunction(R"(["interpolate", ["linear"], ["zoom"], 0, ["number", ["get", "x"]], 10, 10])"); ASSERT_TRUE(fn1); - + auto fn2 = parseFunction(R"(["coalesce", ["interpolate", ["linear"], ["zoom"], 0, ["number", ["get", "x"]], 10, 10], 0])"); ASSERT_TRUE(fn2); diff --git a/test/style/conversion/property_value.test.cpp b/test/style/conversion/property_value.test.cpp index dcb08bcec7..e8a7d844cd 100644 --- a/test/style/conversion/property_value.test.cpp +++ b/test/style/conversion/property_value.test.cpp @@ -14,7 +14,7 @@ TEST(StyleConversion, PropertyValue) { JSDocument doc; doc.Parse<0>(R"(["literal", [1, 2]])"); auto expected = std::array<float, 2>{{1, 2}}; - auto result = convert<PropertyValue<std::array<float, 2>>>(doc, error); + auto result = convert<PropertyValue<std::array<float, 2>>>(doc, error, false, false); ASSERT_TRUE(result); ASSERT_TRUE(result->isConstant()); ASSERT_EQ(result->asConstant(), expected); |