summaryrefslogtreecommitdiff
path: root/test/map/map.test.cpp
diff options
context:
space:
mode:
authorSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-07 14:29:19 +0200
committerSudarsana Babu Nagineni <sudarsana.babu@mapbox.com>2019-03-08 18:20:55 +0200
commit5e2b6bf636472a4464e6ab3ae0d9d01c68de041b (patch)
treed4a924f2ac4174a034448388fb65b033b801a83d /test/map/map.test.cpp
parentc4115f0539be1834db40b318eb4ebb9e27d1eafb (diff)
downloadqtlocation-mapboxgl-5e2b6bf636472a4464e6ab3ae0d9d01c68de041b.tar.gz
[core] Add MapOptions to define properties of Map
To simplify the Map constructor, introduce MapOptions interface to define the properties that can be set on a Map.
Diffstat (limited to 'test/map/map.test.cpp')
-rw-r--r--test/map/map.test.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/map/map.test.cpp b/test/map/map.test.cpp
index 3a8d05ebb2..f45c728944 100644
--- a/test/map/map.test.cpp
+++ b/test/map/map.test.cpp
@@ -5,6 +5,7 @@
#include <mbgl/test/fixture_log_observer.hpp>
#include <mbgl/map/map.hpp>
+#include <mbgl/map/map_options.hpp>
#include <mbgl/gl/context.hpp>
#include <mbgl/gl/headless_frontend.hpp>
#include <mbgl/util/default_thread_pool.hpp>
@@ -38,7 +39,8 @@ public:
MapTest(float pixelRatio = 1, MapMode mode = MapMode::Static)
: frontend(pixelRatio, fileSource, threadPool)
- , map(frontend, observer, frontend.getSize(), pixelRatio, fileSource, threadPool, mode) {
+ , map(frontend, observer, frontend.getSize(), pixelRatio,
+ fileSource, threadPool, MapOptions().withMapMode(mode)) {
}
template <typename T = FileSource>
@@ -47,7 +49,8 @@ public:
typename std::enable_if<std::is_same<T, DefaultFileSource>::value>::type* = 0)
: fileSource { cachePath, assetRoot }
, frontend(pixelRatio, fileSource, threadPool)
- , map(frontend, observer, frontend.getSize(), pixelRatio, fileSource, threadPool, mode) {
+ , map(frontend, observer, frontend.getSize(), pixelRatio,
+ fileSource, threadPool, MapOptions().withMapMode(mode)) {
}
};
@@ -694,7 +697,8 @@ TEST(Map, TEST_DISABLED_ON_CI(ContinuousRendering)) {
});
};
- Map map(frontend, observer, frontend.getSize(), pixelRatio, fileSource, threadPool, MapMode::Continuous);
+ Map map(frontend, observer, frontend.getSize(), pixelRatio, fileSource,
+ threadPool, MapOptions().withMapMode(MapMode::Continuous));
map.getStyle().loadJSON(util::read_file("test/fixtures/api/water.json"));
runLoop.run();