diff options
author | Artem Pavlenko <artem@mapnik.org> | 2020-02-14 16:56:46 +0000 |
---|---|---|
committer | Artem Pavlenko <artem@mapnik.org> | 2020-02-14 16:56:46 +0000 |
commit | 145c053a02d918d74002ea690dac398ee588a374 (patch) | |
tree | c645ffaec12822f0668858181248cd7365fc4e20 /test/map/transform.test.cpp | |
parent | 37a4660ca367f141b9e0dedf3932c74f0ee0c920 (diff) | |
parent | 59294aaef333bdd455bd13d6bab6fca730379b52 (diff) | |
download | qtlocation-mapboxgl-upstream/galinelle_setStyle++_updated.tar.gz |
Merge branch 'master' into galinelle_setStyle++_updatedupstream/galinelle_setStyle++_updated
Diffstat (limited to 'test/map/transform.test.cpp')
-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 |