summaryrefslogtreecommitdiff
path: root/test/api
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-27 19:17:04 +0200
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-28 16:41:15 +0200
commit7af00a404f22742fed4a83e9a36d023d7515025f (patch)
treeac050d12346d81030969f88607dbfd59ca33be11 /test/api
parentf5064e710884d5b822e59d05e51c127c8b3e852b (diff)
downloadqtlocation-mapboxgl-7af00a404f22742fed4a83e9a36d023d7515025f.tar.gz
[core] Include pixelRatio property in MapOptions
Move pixelRatio property from Map constructor to MapOptions.
Diffstat (limited to 'test/api')
-rw-r--r--test/api/annotations.test.cpp7
-rw-r--r--test/api/api_misuse.test.cpp5
-rw-r--r--test/api/custom_geometry_source.test.cpp5
-rw-r--r--test/api/custom_layer.test.cpp5
-rw-r--r--test/api/query.test.cpp7
-rw-r--r--test/api/recycle_map.cpp5
6 files changed, 14 insertions, 20 deletions
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index 612c4f0ab8..11920d1624 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -29,11 +29,10 @@ class AnnotationTest {
public:
util::RunLoop loop;
ThreadPool threadPool { 4 };
- float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, threadPool };
+ HeadlessFrontend frontend { 1, threadPool };
- MapAdapter map { frontend, MapObserver::nullObserver(), pixelRatio, std::make_shared<StubFileSource>(),
- threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
+ MapAdapter map { frontend, MapObserver::nullObserver(), 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 17eb2de14b..cca47de69c 100644
--- a/test/api/api_misuse.test.cpp
+++ b/test/api/api_misuse.test.cpp
@@ -22,11 +22,10 @@ TEST(API, RenderWithoutCallback) {
util::RunLoop loop;
ThreadPool threadPool(4);
- float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, threadPool };
+ HeadlessFrontend frontend { 1, threadPool };
auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(),
- pixelRatio, std::make_shared<StubFileSource>(), threadPool,
+ std::make_shared<StubFileSource>(), threadPool,
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
map->renderStill(nullptr);
diff --git a/test/api/custom_geometry_source.test.cpp b/test/api/custom_geometry_source.test.cpp
index 679291372d..f796e3086b 100644
--- a/test/api/custom_geometry_source.test.cpp
+++ b/test/api/custom_geometry_source.test.cpp
@@ -21,9 +21,8 @@ TEST(CustomGeometrySource, Grid) {
util::RunLoop loop;
auto threadPool = sharedThreadPool();
- float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, *threadPool };
- Map map(frontend, MapObserver::nullObserver(), pixelRatio, *threadPool,
+ HeadlessFrontend frontend { 1, *threadPool };
+ Map map(frontend, MapObserver::nullObserver(), *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"));
diff --git a/test/api/custom_layer.test.cpp b/test/api/custom_layer.test.cpp
index 4f1429d637..c836ab81ac 100644
--- a/test/api/custom_layer.test.cpp
+++ b/test/api/custom_layer.test.cpp
@@ -91,9 +91,8 @@ TEST(CustomLayer, Basic) {
util::RunLoop loop;
ThreadPool threadPool(4);
- float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, threadPool };
- Map map(frontend, MapObserver::nullObserver(), pixelRatio, threadPool,
+ HeadlessFrontend frontend { 1, threadPool };
+ Map map(frontend, MapObserver::nullObserver(), 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"));
diff --git a/test/api/query.test.cpp b/test/api/query.test.cpp
index 0dd9882be2..ddf5df6aab 100644
--- a/test/api/query.test.cpp
+++ b/test/api/query.test.cpp
@@ -36,10 +36,9 @@ public:
util::RunLoop loop;
std::shared_ptr<StubFileSource> fileSource = std::make_shared<StubFileSource>();
ThreadPool threadPool { 4 };
- float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, threadPool };
- MapAdapter map { frontend, MapObserver::nullObserver(), pixelRatio, fileSource,
- threadPool, MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize())};
+ HeadlessFrontend frontend { 1, threadPool };
+ MapAdapter map { frontend, MapObserver::nullObserver(), 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 6f1560d463..ac9de9b230 100644
--- a/test/api/recycle_map.cpp
+++ b/test/api/recycle_map.cpp
@@ -24,11 +24,10 @@ TEST(API, RecycleMapUpdateImages) {
util::RunLoop loop;
ThreadPool threadPool(4);
- float pixelRatio { 1 };
- HeadlessFrontend frontend { pixelRatio, threadPool };
+ HeadlessFrontend frontend { 1, threadPool };
auto map = std::make_unique<MapAdapter>(frontend, MapObserver::nullObserver(),
- pixelRatio, std::make_shared<StubFileSource>(), threadPool,
+ std::make_shared<StubFileSource>(), threadPool,
MapOptions().withMapMode(MapMode::Static).withSize(frontend.getSize()));
EXPECT_TRUE(map);