diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-11 14:10:17 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-05-11 15:48:51 +0300 |
commit | c13dd32242b559b00b0b716dc524ed5161c2b147 (patch) | |
tree | 96c83728499b7317c8a6d087d38016b9a2e55644 /test/map | |
parent | 659c2568ece4153f34d2880e53f54351f51b0917 (diff) | |
download | qtlocation-mapboxgl-c13dd32242b559b00b0b716dc524ed5161c2b147.tar.gz |
[core] Added Viewport mode
Satisfies embedding platforms that requires the viewport coordinate
systems to be set according to its standards e.g. viewport mirrored
vertically.
Diffstat (limited to 'test/map')
-rw-r--r-- | test/map/transform.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/map/transform.cpp b/test/map/transform.cpp index a3a62e7ad8..b9a905274a 100644 --- a/test/map/transform.cpp +++ b/test/map/transform.cpp @@ -8,7 +8,7 @@ using namespace mbgl; TEST(Transform, InvalidScale) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); ASSERT_DOUBLE_EQ(0, transform.getLatLng().latitude); ASSERT_DOUBLE_EQ(0, transform.getLatLng().longitude); @@ -48,7 +48,7 @@ TEST(Transform, InvalidScale) { TEST(Transform, InvalidLatLng) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); ASSERT_DOUBLE_EQ(0, transform.getLatLng().latitude); ASSERT_DOUBLE_EQ(0, transform.getLatLng().longitude); @@ -84,7 +84,7 @@ TEST(Transform, InvalidLatLng) { TEST(Transform, InvalidBearing) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); ASSERT_DOUBLE_EQ(0, transform.getLatLng().latitude); ASSERT_DOUBLE_EQ(0, transform.getLatLng().longitude); @@ -111,7 +111,7 @@ TEST(Transform, PerspectiveProjection) { MockView view; LatLng loc; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); transform.setScale(2 << 9); transform.setPitch(0.9); @@ -142,7 +142,7 @@ TEST(Transform, PerspectiveProjection) { TEST(Transform, UnwrappedLatLng) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); transform.setScale(2 << 9); transform.setPitch(0.9); @@ -175,7 +175,7 @@ TEST(Transform, ConstrainHeightOnly) { MockView view; LatLng loc; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); transform.setScale(std::pow(2, util::MAX_ZOOM)); @@ -194,7 +194,7 @@ TEST(Transform, ConstrainWidthAndHeight) { MockView view; LatLng loc; - Transform transform(view, ConstrainMode::WidthAndHeight); + Transform transform(view, ConstrainMode::WidthAndHeight, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); transform.setScale(std::pow(2, util::MAX_ZOOM)); @@ -211,7 +211,7 @@ TEST(Transform, ConstrainWidthAndHeight) { TEST(Transform, Anchor) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); const LatLng latLng { 10, -100 }; @@ -312,7 +312,7 @@ TEST(Transform, Anchor) { TEST(Transform, Padding) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); ASSERT_DOUBLE_EQ(0, transform.getLatLng().latitude); @@ -350,7 +350,7 @@ TEST(Transform, Padding) { TEST(Transform, MoveBy) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); transform.setLatLngZoom({ 0, 0 }, 10); @@ -378,7 +378,7 @@ TEST(Transform, MoveBy) { TEST(Transform, Antimeridian) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); transform.setLatLngZoom({ 0, 0 }, 1); @@ -422,7 +422,7 @@ TEST(Transform, Antimeridian) { TEST(Transform, Camera) { MockView view; - Transform transform(view, ConstrainMode::HeightOnly); + Transform transform(view, ConstrainMode::HeightOnly, ViewportMode::Default); transform.resize({{ 1000, 1000 }}); const LatLng latLng1 { 45, 135 }; |