summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-06-01 00:58:03 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-06-01 17:04:09 +0300
commit99cfbacdfba642e042132660b0201db0984b6d22 (patch)
tree65a2606947ab083550f46db93d800a982829dbcf /test
parent893584517182c270b7238a2fddb616a8a0e657d6 (diff)
downloadqtlocation-mapboxgl-99cfbacdfba642e042132660b0201db0984b6d22.tar.gz
[core] Make TransformState LatLngBounds optional
Diffstat (limited to 'test')
-rw-r--r--test/map/transform.test.cpp10
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);