diff options
author | Ander Conselvan de Oliveira <ander.deoliveira@mapbox.com> | 2019-11-04 08:12:23 +0200 |
---|---|---|
committer | Ander Conselvan de Oliveira <ander.deoliveira@mapbox.com> | 2019-11-13 13:31:01 +0200 |
commit | 4c1d03c257754ecc1555f3e31b3c6ccf45c4bf7b (patch) | |
tree | d6bd914727d337216e269b08b139a87bca7f41d4 /test | |
parent | 089ff8e2b34583de6c989c05a0771b108b3c82f0 (diff) | |
download | qtlocation-mapboxgl-4c1d03c257754ecc1555f3e31b3c6ccf45c4bf7b.tar.gz |
[core] Fix MapSnapshotter build failure on Windows
MSVC implementation of std::promise is buggy and only works with types
that can be default-constructed. To avoid a compilation failure in the
instantiation of ask() inside MapSnapshotter::getRegion(), which creates
a std::promise<LanLngBounds>, make LatLngBounds' default constructor
public.
Diffstat (limited to 'test')
-rw-r--r-- | test/map/map.test.cpp | 4 | ||||
-rw-r--r-- | test/map/transform.test.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp index 0eebc93f32..9e37f97b8b 100644 --- a/test/map/map.test.cpp +++ b/test/map/map.test.cpp @@ -316,7 +316,7 @@ TEST(Map, DefaultBoundOptions) { EXPECT_EQ(*bounds.minZoom, util::MIN_ZOOM); EXPECT_EQ(*bounds.maxZoom, util::DEFAULT_MAX_ZOOM); - EXPECT_EQ(*bounds.bounds, LatLngBounds::unbounded()); + EXPECT_EQ(*bounds.bounds, LatLngBounds()); } TEST(Map, MapOptions) { @@ -1053,4 +1053,4 @@ TEST(Map, NoHangOnMissingImage) { test.map.jumpTo(test.map.getStyle().getDefaultCamera()); // The test passes if the following call does not hang. test.frontend.render(test.map); -}
\ No newline at end of file +} diff --git a/test/map/transform.test.cpp b/test/map/transform.test.cpp index 84fdb06b21..95fb744206 100644 --- a/test/map/transform.test.cpp +++ b/test/map/transform.test.cpp @@ -609,7 +609,7 @@ TEST(Transform, LatLngBounds) { transform.jumpTo(CameraOptions().withCenter(LatLng()).withZoom(transform.getState().getMaxZoom())); // Default bounds. - ASSERT_EQ(transform.getState().getLatLngBounds(), LatLngBounds::unbounded()); + ASSERT_EQ(transform.getState().getLatLngBounds(), LatLngBounds()); ASSERT_EQ(transform.getLatLng(), nullIsland); // Invalid bounds. @@ -617,7 +617,7 @@ TEST(Transform, LatLngBounds) { transform.setLatLngBounds(LatLngBounds::empty()); ASSERT_TRUE(false) << "Should throw"; } catch (...) { - ASSERT_EQ(transform.getState().getLatLngBounds(), LatLngBounds::unbounded()); + ASSERT_EQ(transform.getState().getLatLngBounds(), LatLngBounds()); } transform.jumpTo(CameraOptions().withCenter(sanFrancisco)); |