summaryrefslogtreecommitdiff
path: root/test/style/function/source_function.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/style/function/source_function.test.cpp')
-rw-r--r--test/style/function/source_function.test.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/style/function/source_function.test.cpp b/test/style/function/source_function.test.cpp
index 260620c8d0..46ad961002 100644
--- a/test/style/function/source_function.test.cpp
+++ b/test/style/function/source_function.test.cpp
@@ -76,11 +76,14 @@ TEST(SourceFunction, Categorical) {
EXPECT_EQ(0.0f, SourceFunction<float>("property", CategoricalStops<float>({{ int64_t(1), 1.0f }}))
.evaluate(oneString, 0.0f));
- EXPECT_EQ(0.0f, SourceFunction<float>("property", CategoricalStops<float>({{ "1"s, 1.0f }}))
+ CategoricalStops<float>::Stops stops;
+ stops["1"s] = 1.0f;
+
+ EXPECT_EQ(0.0f, SourceFunction<float>("property", CategoricalStops<float>(stops))
.evaluate(oneInteger, 0.0f));
- EXPECT_EQ(0.0f, SourceFunction<float>("property", CategoricalStops<float>({{ "1"s, 1.0f }}))
+ EXPECT_EQ(0.0f, SourceFunction<float>("property", CategoricalStops<float>(stops))
.evaluate(oneDouble, 0.0f));
- EXPECT_EQ(1.0f, SourceFunction<float>("property", CategoricalStops<float>({{ "1"s, 1.0f }}))
+ EXPECT_EQ(1.0f, SourceFunction<float>("property", CategoricalStops<float>(stops))
.evaluate(oneString, 0.0f));
EXPECT_EQ(1.0f, SourceFunction<float>("property", CategoricalStops<float>({{ true, 1.0f }}))