diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2020-02-12 12:34:30 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2020-02-14 12:01:52 +0200 |
commit | a4c4de28285a5abe1343fe5abf718adad2b9d354 (patch) | |
tree | cb2ab9ecdc7d46fd21839af8b42c71821e7e2842 /test/map | |
parent | ddc7930b2792ffe12e7d1d3e0a231b7e204e1ff5 (diff) | |
download | qtlocation-mapboxgl-a4c4de28285a5abe1343fe5abf718adad2b9d354.tar.gz |
[test] Fix failing tests on iOS
Diffstat (limited to 'test/map')
-rw-r--r-- | test/map/transform.test.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/map/transform.test.cpp b/test/map/transform.test.cpp index 95fb744206..02ecbfbee4 100644 --- a/test/map/transform.test.cpp +++ b/test/map/transform.test.cpp @@ -621,7 +621,8 @@ TEST(Transform, LatLngBounds) { } transform.jumpTo(CameraOptions().withCenter(sanFrancisco)); - ASSERT_EQ(transform.getLatLng(), sanFrancisco); + ASSERT_NEAR(transform.getLatLng().latitude(), sanFrancisco.latitude(), 1e-8); + ASSERT_NEAR(transform.getLatLng().longitude(), sanFrancisco.longitude(), 1e-8); // Single location. transform.setLatLngBounds(LatLngBounds::singleton(sanFrancisco)); @@ -655,7 +656,7 @@ TEST(Transform, LatLngBounds) { // └───┴───┸───┴───┸───┴───┘ transform.setLatLngBounds(LatLngBounds::hull({ -90.0, 0.0 }, { 90.0, 180.0 })); transform.jumpTo(CameraOptions().withCenter(sanFrancisco)); - ASSERT_EQ(transform.getLatLng().latitude(), sanFrancisco.latitude()); + ASSERT_NEAR(transform.getLatLng().latitude(), sanFrancisco.latitude(), 1e-8); ASSERT_EQ(transform.getLatLng().longitude(), 0.0); // -1 | 0 | +1 |