diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/map/transform.test.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/map/transform.test.cpp b/test/map/transform.test.cpp index 40cae09d8b..aa49d250b6 100644 --- a/test/map/transform.test.cpp +++ b/test/map/transform.test.cpp @@ -537,12 +537,16 @@ TEST(Transform, LatLngBounds) { transform.setLatLngZoom({ 0, 0 }, transform.getState().getMaxZoom()); // Default bounds. - ASSERT_EQ(transform.getState().getLatLngBounds(), LatLngBounds::world()); + ASSERT_EQ(transform.getState().getLatLngBounds(), optional<LatLngBounds> {}); ASSERT_EQ(transform.getLatLng(), nullIsland); // Invalid bounds. - transform.setLatLngBounds(LatLngBounds::empty()); - ASSERT_EQ(transform.getState().getLatLngBounds(), LatLngBounds::world()); + try { + transform.setLatLngBounds(LatLngBounds::empty()); + ASSERT_TRUE(false) << "Should throw"; + } catch (...) { + ASSERT_EQ(transform.getState().getLatLngBounds(), optional<LatLngBounds> {}); + } transform.setLatLng(sanFrancisco); ASSERT_EQ(transform.getLatLng(), sanFrancisco); |