diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-08-02 11:35:38 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-08-02 12:16:37 -0700 |
commit | a5fea5febf908c8cc94222bdbccf53afafc0c1dd (patch) | |
tree | 68fb4646b16c294aee26bd1b2573c803f5dd17e0 /test/style | |
parent | 1a840281b5dc9486400974bceddf99a92f6138af (diff) | |
download | qtlocation-mapboxgl-a5fea5febf908c8cc94222bdbccf53afafc0c1dd.tar.gz |
Fix TileJSON conversion to allow single point bounds
Diffstat (limited to 'test/style')
-rw-r--r-- | test/style/conversion/tileset.test.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/style/conversion/tileset.test.cpp b/test/style/conversion/tileset.test.cpp index f405fb1361..f92ed46786 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, PointBounds) { + Error error; + mbgl::optional<Tileset> converted = convertJSON<Tileset>(R"JSON({ + "tiles": ["http://mytiles"], + "bounds": [0, 0, 0, 0] + })JSON", error); + EXPECT_TRUE((bool) converted); + EXPECT_EQ(converted->bounds, LatLngBounds::hull({0, 0}, {0, 0})); +} + TEST(Tileset, BoundsAreClamped) { Error error; mbgl::optional<Tileset> converted = convertJSON<Tileset>(R"JSON({ |