summaryrefslogtreecommitdiff
path: root/test/map/map.test.cpp
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-06 14:30:23 +0200
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-08 17:36:40 +0200
commit744d92e7636ffcba7aea7a302315326b1098d8dc (patch)
tree11df789f9b6dc0913b3d95f1debbfd87c9225a6a /test/map/map.test.cpp
parentc6598fc5da063f9b60204639cd619647cbbc89da (diff)
downloadqtlocation-mapboxgl-744d92e7636ffcba7aea7a302315326b1098d8dc.tar.gz
[core] consolidate Axonometric rendering API
Instead of having individual APIs for setting axonometric and skew options, create ProjectionMode struct that holds all the relevant options for Axonometric rendering and introduce setter/getter on the Map for those options.
Diffstat (limited to 'test/map/map.test.cpp')
-rw-r--r--test/map/map.test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 6d1650b82c..3a8d05ebb2 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -268,6 +268,17 @@ TEST(Map, SetStyleDefaultCamera) {
EXPECT_DOUBLE_EQ(*camera.zoom, 0.5);
}
+TEST(Map, ProjectionMode) {
+ MapTest<> test;
+
+ test.map.setProjectionMode(ProjectionMode().withAxonometric(true).withXSkew(1.0).withYSkew(0.0));
+ auto options = test.map.getProjectionMode();
+
+ EXPECT_TRUE(*options.axonometric);
+ EXPECT_EQ(*options.xSkew, 1.0);
+ EXPECT_EQ(*options.ySkew, 0.0);
+}
+
TEST(Map, SetStyleInvalidJSON) {
Log::setObserver(std::make_unique<FixtureLogObserver>());