summaryrefslogtreecommitdiff
path: root/test/style/properties.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/style/properties.test.cpp')
-rw-r--r--test/style/properties.test.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/style/properties.test.cpp b/test/style/properties.test.cpp
index f3af1a92b2..69ffb0b0ba 100644
--- a/test/style/properties.test.cpp
+++ b/test/style/properties.test.cpp
@@ -1,7 +1,8 @@
#include <mbgl/test/util.hpp>
-#include <mbgl/style/properties.hpp>
#include <mbgl/style/expression/dsl.hpp>
+#include <mbgl/style/expression/format_expression.hpp>
+#include <mbgl/style/properties.hpp>
#include <mbgl/renderer/property_evaluator.hpp>
#include <mbgl/renderer/data_driven_property_evaluator.hpp>
@@ -136,3 +137,9 @@ TEST(TransitioningDataDrivenPropertyValue, Evaluate) {
ASSERT_FALSE(evaluateDataExpression(t1, 0ms).isConstant()) <<
"A paint property transition to a data-driven evaluates immediately to the final value (see https://github.com/mapbox/mapbox-gl-native/issues/8237).";
}
+
+TEST(PropertyValue, EvaluateFormatted) {
+ using namespace mbgl::style::expression;
+ using namespace mbgl::style::expression::dsl;
+ ASSERT_EQ(PropertyExpression<Formatted> { format("hello") }.evaluate(12.0).toString(), std::string("hello"));
+}