summaryrefslogtreecommitdiff
path: root/test/style/functions.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/style/functions.test.cpp')
-rw-r--r--test/style/functions.test.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/style/functions.test.cpp b/test/style/functions.test.cpp
index 9577bcc633..c50787814b 100644
--- a/test/style/functions.test.cpp
+++ b/test/style/functions.test.cpp
@@ -2,16 +2,16 @@
#include <mbgl/test/util.hpp>
#include <mbgl/style/property_evaluator.hpp>
-#include <mbgl/style/calculation_parameters.hpp>
+#include <mbgl/style/property_evaluation_parameters.hpp>
using namespace mbgl;
using namespace mbgl::style;
float evaluate(PropertyValue<float> value, float zoom) {
- return PropertyValue<float>::visit(value, PropertyEvaluator<float>(CalculationParameters(zoom), 0));
+ return value.evaluate(PropertyEvaluator<float>(PropertyEvaluationParameters(zoom), 0));
}
std::string evaluate(PropertyValue<std::string> value, float zoom) {
- return PropertyValue<std::string>::visit(value, PropertyEvaluator<std::string>(CalculationParameters(zoom), ""));
+ return value.evaluate(PropertyEvaluator<std::string>(PropertyEvaluationParameters(zoom), ""));
}
TEST(Function, Constant) {
@@ -50,12 +50,6 @@ TEST(Function, Stops) {
EXPECT_EQ(3.0, evaluate(slope_2, 15));
EXPECT_EQ(3.0, evaluate(slope_2, 22));
- // Test no values.
- Function<float> slope_3({}, 1.75);
- EXPECT_EQ(1, evaluate(slope_3, 2));
- EXPECT_EQ(1, evaluate(slope_3, 6));
- EXPECT_EQ(1, evaluate(slope_3, 12));
-
// Explicit constant slope in fringe regions.
Function<float> slope_4({ { 0, 2 }, { 8, 10 } }, 1);