summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-03-14 12:08:24 -0400
committerJason Wray <jason@mapbox.com>2018-03-14 12:48:30 -0400
commit11d506f8034c02103bc33e06ae8913be7908a877 (patch)
tree45aca5ceffc6547a61c5f9818dec8deb65ba133e /test
parentd7bc36db6f3aa46246bc1aae1c5c63c56b5ce262 (diff)
parent4544b7aae9ab96ff89f3e46a1ee38ce0af95054f (diff)
downloadqtlocation-mapboxgl-11d506f8034c02103bc33e06ae8913be7908a877.tar.gz
Merge tag 'ios-v3.7.6' into master
Diffstat (limited to 'test')
-rw-r--r--test/style/conversion/tileset.test.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/style/conversion/tileset.test.cpp b/test/style/conversion/tileset.test.cpp
index 9487277cca..f10aa0e318 100644
--- a/test/style/conversion/tileset.test.cpp
+++ b/test/style/conversion/tileset.test.cpp
@@ -62,6 +62,16 @@ TEST(Tileset, ValidWorldBounds) {
EXPECT_EQ(converted->bounds, LatLngBounds::hull({90, -180}, {-90, 180}));
}
+TEST(Tileset, BoundsAreClamped) {
+ Error error;
+ mbgl::optional<Tileset> converted = convertJSON<Tileset>(R"JSON({
+ "tiles": ["http://mytiles"],
+ "bounds": [-181.0000005,-90,180.00000000000006,90]
+ })JSON", error);
+ EXPECT_TRUE((bool) converted);
+ EXPECT_EQ(converted->bounds, LatLngBounds::hull({90, -180}, {-90, 180}));
+}
+
TEST(Tileset, FullConversion) {
Error error;
Tileset converted = *convertJSON<Tileset>(R"JSON({