summaryrefslogtreecommitdiff
path: root/test/style/conversion
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2018-03-29 12:55:29 -0700
committerMinh Nguyễn <mxn@1ec5.org>2018-03-29 19:36:09 -0700
commite29f8c15e8f34c8663311c3a5684f1698c8df4bb (patch)
tree50f8c88b58ef5c26c9ac6ab65c9bba71eb7dd1e4 /test/style/conversion
parent23ccfce1765588511ce5055e20994894c6b2251e (diff)
downloadqtlocation-mapboxgl-e29f8c15e8f34c8663311c3a5684f1698c8df4bb.tar.gz
[core] Round-trip linear interpolators
Cherry-picked from c231191dbc6f055341fd25ce97309614dc52802f.
Diffstat (limited to 'test/style/conversion')
-rw-r--r--test/style/conversion/stringify.test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/style/conversion/stringify.test.cpp b/test/style/conversion/stringify.test.cpp
index cb3b62dc62..136f276aaf 100644
--- a/test/style/conversion/stringify.test.cpp
+++ b/test/style/conversion/stringify.test.cpp
@@ -80,6 +80,8 @@ TEST(Stringify, Filter) {
}
TEST(Stringify, CameraFunction) {
+ ASSERT_EQ(stringify(CameraFunction<float>(ExponentialStops<float> { {{0, 1}}, 1 })),
+ "[\"interpolate\",[\"linear\"],[\"zoom\"],0.0,1.0]");
ASSERT_EQ(stringify(CameraFunction<float>(ExponentialStops<float> { {{0, 1}}, 2 })),
"[\"interpolate\",[\"exponential\",2.0],[\"zoom\"],0.0,1.0]");
ASSERT_EQ(stringify(CameraFunction<float>(IntervalStops<float> { {{0, 1}} })),
@@ -109,7 +111,7 @@ TEST(Stringify, CompositeFunction) {
2
}, 0.0f)),
"[\"interpolate\","
- "[\"exponential\",1.0],"
+ "[\"linear\"],"
"[\"zoom\"],"
"0.0,[\"interpolate\",[\"exponential\",2.0],[\"number\",[\"get\",\"property\"]],0.0,1.0],"
"1.0,[\"interpolate\",[\"exponential\",2.0],[\"number\",[\"get\",\"property\"]],0.0,1.0]]");