summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-26 00:00:37 +0200
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-28 16:41:15 +0200
commit1cc1d4ea08ae02c3cc9b4dd1474845456c17d1bc (patch)
treed7de92e01ef1b1bf654ff8784534e534608a352f /test/api
parent11afef7825d622a237fa026e45e6d61b4de94068 (diff)
downloadqtlocation-mapboxgl-1cc1d4ea08ae02c3cc9b4dd1474845456c17d1bc.tar.gz
[core] Add setter/getter for size property in MapOptions
Diffstat (limited to 'test/api')
-rw-r--r--test/api/annotations.test.cpp4
-rw-r--r--test/api/api_misuse.test.cpp4
-rw-r--r--test/api/custom_geometry_source.test.cpp4
-rw-r--r--test/api/custom_layer.test.cpp4
-rw-r--r--test/api/query.test.cpp4
-rw-r--r--test/api/recycle_map.cpp4
6 files changed, 12 insertions, 12 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index 2a9737e10b..612c4f0ab8 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -32,8 +32,8 @@ public:
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, threadPool };
- MapAdapter map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, std::make_shared<StubFileSource>(),
- threadPool, MapOptions().withMapMode(MapMode::Static)};
+ MapAdapter map { frontend, MapObserver::nullObserver(), pixelRatio, std::make_shared<StubFileSource>(),
+ threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
void checkRendering(const char * name) {
test::checkImage(std::string("test/fixtures/annotations/") + name,
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp
index 6fc04ab26f..17eb2de14b 100644
--- a/test/api/api_misuse.test.cpp
+++ b/test/api/api_misuse.test.cpp
@@ -25,9 +25,9 @@ TEST(API, RenderWithoutCallback) {
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, threadPool };
- auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(), frontend.getSize(),
+ auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(),
pixelRatio, std::make_shared<StubFileSource>(), threadPool,
- MapOptions().withMapMode(MapMode::Static));
+ MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
map->renderStill(nullptr);
// Force Map thread to join.
diff --git a/test/api/custom_geometry_source.test.cpp b/test/api/custom_geometry_source.test.cpp
index 58af09c1ac..679291372d 100644
--- a/test/api/custom_geometry_source.test.cpp
+++ b/test/api/custom_geometry_source.test.cpp
@@ -23,8 +23,8 @@ TEST(CustomGeometrySource, Grid) {
auto threadPool = sharedThreadPool();
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, *threadPool };
- Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, *threadPool,
- MapOptions().withMapMode(MapMode::Static),
+ Map map(frontend, MapObserver::nullObserver(), pixelRatio, *threadPool,
+ MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()),
ResourceOptions().withCachePath(":memory:").withAssetPath("test/fixtures/api/assets"));
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
map.jumpTo(CameraOptions().withCenter(LatLng { 37.8, -122.5 }).withZoom(10.0));
diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp
index e16d2852ec..4f1429d637 100644
--- a/test/api/custom_layer.test.cpp
+++ b/test/api/custom_layer.test.cpp
@@ -93,8 +93,8 @@ TEST(CustomLayer, Basic) {
ThreadPool threadPool(4);
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, threadPool };
- Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, threadPool,
- MapOptions().withMapMode(MapMode::Static),
+ Map map(frontend, MapObserver::nullObserver(), pixelRatio, threadPool,
+ MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()),
ResourceOptions().withCachePath(":memory:").withAssetPath("test/fixtures/api/assets"));
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
map.jumpTo(CameraOptions().withCenter(LatLng { 37.8, -122.5 }).withZoom(10.0));
diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp
index b4297bfe82..0dd9882be2 100644
--- a/test/api/query.test.cpp
+++ b/test/api/query.test.cpp
@@ -38,8 +38,8 @@ public:
ThreadPool threadPool { 4 };
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, threadPool };
- MapAdapter map { frontend, MapObserver::nullObserver(), frontend.getSize(), pixelRatio, fileSource,
- threadPool, MapOptions().withMapMode(MapMode::Static)};
+ MapAdapter map { frontend, MapObserver::nullObserver(), pixelRatio, fileSource,
+ threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
};
std::vector<Feature> getTopClusterFeature(QueryTest& test) {
diff --git a/test/api/recycle_map.cpp b/test/api/recycle_map.cpp
index 7d14bd14de..6f1560d463 100644
--- a/test/api/recycle_map.cpp
+++ b/test/api/recycle_map.cpp
@@ -27,9 +27,9 @@ TEST(API, RecycleMapUpdateImages) {
float pixelRatio { 1 };
HeadlessFrontend frontend { pixelRatio, threadPool };
- auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(), frontend.getSize(),
+ auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(),
pixelRatio, std::make_shared<StubFileSource>(), threadPool,
- MapOptions().withMapMode(MapMode::Static));
+ MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
EXPECT_TRUE(map);