diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2020-02-26 10:11:30 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2020-02-26 11:21:04 +0200 |
commit | 096570e7372dec2fe26fd107ed7ae522d1adf672 (patch) | |
tree | 4e935fc44a5b55a8493d5a4318fa31a429ccf772 | |
parent | f3c8cefc7f71de9077a7a0027c3653cf7488a0cc (diff) | |
download | qtlocation-mapboxgl-096570e7372dec2fe26fd107ed7ae522d1adf672.tar.gz |
[test] Verify pitch bounds
-rw-r--r-- | test/map/map.test.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp index c161065e1a..41501e38a4 100644 --- a/test/map/map.test.cpp +++ b/test/map/map.test.cpp @@ -253,6 +253,8 @@ TEST(Map, LatLngsToCameraWithBearingAndPitchMinMax) { EXPECT_NEAR(virtualCamera.center->latitude(), 28.49288, 1e-5); EXPECT_NEAR(virtualCamera.center->longitude(), 74.97437, 1e-5); ASSERT_DOUBLE_EQ(*virtualCamera.pitch, 0); + ASSERT_DOUBLE_EQ(*test.map.getBounds().minPitch, 0); + ASSERT_DOUBLE_EQ(*test.map.getBounds().maxPitch, 0); test.map.setBounds(BoundOptions().withMinPitch(20).withMaxPitch(60)); virtualCamera = test.map.cameraForLatLngs(latLngs, {}, 23, 0); @@ -261,6 +263,8 @@ TEST(Map, LatLngsToCameraWithBearingAndPitchMinMax) { EXPECT_NEAR(virtualCamera.center->latitude(), 28.53718, 1e-5); EXPECT_NEAR(virtualCamera.center->longitude(), 74.31746, 1e-5); ASSERT_DOUBLE_EQ(*virtualCamera.pitch, 20.0); + ASSERT_DOUBLE_EQ(*test.map.getBounds().minPitch, 20); + ASSERT_DOUBLE_EQ(*test.map.getBounds().maxPitch, 60); } TEST(Map, CameraToLatLngBounds) { |