diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-01-31 15:44:18 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-02 09:44:42 -0800 |
commit | 8a5bff8ee630673c6ebc496322eab94a41ae9353 (patch) | |
tree | 8bb6428cd9c3d591c237d77f94d4b0e56efb0ee0 /test/style/conversion | |
parent | 141e995806576364d185626176c1b993fc519291 (diff) | |
download | qtlocation-mapboxgl-8a5bff8ee630673c6ebc496322eab94a41ae9353.tar.gz |
[core] default value support in categorical function conversion
Diffstat (limited to 'test/style/conversion')
-rw-r--r-- | test/style/conversion/stringify.test.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/style/conversion/stringify.test.cpp b/test/style/conversion/stringify.test.cpp index 6814563ceb..dd04789d4b 100644 --- a/test/style/conversion/stringify.test.cpp +++ b/test/style/conversion/stringify.test.cpp @@ -95,6 +95,8 @@ TEST(Stringify, SourceFunction) { "{\"property\":\"property\",\"type\":\"categorical\",\"stops\":[[true,1.0]]}"); ASSERT_EQ(stringify(SourceFunction<float>("property", IdentityStops<float> {})), "{\"property\":\"property\",\"type\":\"identity\"}"); + ASSERT_EQ(stringify(SourceFunction<float>("property", IdentityStops<float> {}, 0.0f)), + "{\"property\":\"property\",\"type\":\"identity\",\"default\":0.0}"); } TEST(Stringify, CompositeFunction) { @@ -102,11 +104,11 @@ TEST(Stringify, CompositeFunction) { std::map<float, ExponentialStops<float>> { { 0, ExponentialStops<float> { {{0, 1}}, 2 } }, { 1, ExponentialStops<float> { {{0, 1}}, 2 } } - })), + }, 0.0f)), "{\"property\":\"property\",\"type\":\"exponential\",\"base\":2.0," "\"stops\":[" "[{\"zoom\":0.0,\"value\":0.0},1.0]," - "[{\"zoom\":1.0,\"value\":0.0},1.0]]}"); + "[{\"zoom\":1.0,\"value\":0.0},1.0]],\"default\":0.0}"); } TEST(Stringify, PropertyValue) { |