diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2018-03-29 12:55:29 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2018-03-30 15:36:30 -0700 |
commit | f4d9fb816d4a22bcc17a07452a926f4f06e75d3b (patch) | |
tree | e4b08eb47a1425b01d18c9e0676a1c6b982940b1 /test/style | |
parent | cf5d2ca4efc6e00798f03aebaa1c6902f0330230 (diff) | |
download | qtlocation-mapboxgl-f4d9fb816d4a22bcc17a07452a926f4f06e75d3b.tar.gz |
[core] Round-trip linear interpolators
Diffstat (limited to 'test/style')
-rw-r--r-- | test/style/conversion/stringify.test.cpp | 4 |
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]]"); |