summaryrefslogtreecommitdiff
path: root/test/style/conversion/function.test.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2018-07-31 14:21:47 -0700
committerGitHub <noreply@github.com>2018-07-31 14:21:47 -0700
commit9bdd765a02de75851a00ab85223d5d582a104757 (patch)
treebcb417a47808a4a94c171b083c7f2e2cce457107 /test/style/conversion/function.test.cpp
parent885f6e3c02138398d094e49243817a83349b4d50 (diff)
downloadqtlocation-mapboxgl-9bdd765a02de75851a00ab85223d5d582a104757.tar.gz
[core] Merge DataDrivenPropertyValue into PropertyValue (#12513)
Diffstat (limited to 'test/style/conversion/function.test.cpp')
-rw-r--r--test/style/conversion/function.test.cpp7
1 files changed, 3 insertions, 4 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);