summaryrefslogtreecommitdiff
path: root/test/util
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/util
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/util')
-rw-r--r--test/util/memory.test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/util/memory.test.cpp b/test/util/memory.test.cpp
index e92311226b..a0e64a6704 100644
--- a/test/util/memory.test.cpp
+++ b/test/util/memory.test.cpp
@@ -3,6 +3,7 @@
#include <mbgl/test/util.hpp>
#include <mbgl/map/map.hpp>
+#include <mbgl/map/map_options.hpp>
#include <mbgl/gl/headless_frontend.hpp>
#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/util/io.hpp>
@@ -72,7 +73,7 @@ TEST(Memory, Vector) {
HeadlessFrontend frontend { { 256, 256 }, ratio, test.fileSource, test.threadPool };
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), ratio, test.fileSource,
- test.threadPool, MapMode::Static);
+ test.threadPool, MapOptions().withMapMode(MapMode::Static));
map.jumpTo(CameraOptions().withZoom(16));
map.getStyle().loadURL("mapbox://streets");
@@ -85,7 +86,7 @@ TEST(Memory, Raster) {
HeadlessFrontend frontend { { 256, 256 }, ratio, test.fileSource, test.threadPool };
Map map(frontend, MapObserver::nullObserver(), frontend.getSize(), ratio, test.fileSource,
- test.threadPool, MapMode::Static);
+ test.threadPool, MapOptions().withMapMode(MapMode::Static));
map.getStyle().loadURL("mapbox://satellite");
frontend.render(map);
@@ -122,7 +123,8 @@ TEST(Memory, Footprint) {
public:
FrontendAndMap(MemoryTest& test_, const char* style)
: frontend(Size{ 256, 256 }, 2, test_.fileSource, test_.threadPool)
- , map(frontend, MapObserver::nullObserver(), frontend.getSize(), 2, test_.fileSource, test_.threadPool, MapMode::Static) {
+ , map(frontend, MapObserver::nullObserver(), frontend.getSize(), 2, test_.fileSource
+ , test_.threadPool, MapOptions().withMapMode(MapMode::Static)) {
map.jumpTo(CameraOptions().withZoom(16));
map.getStyle().loadURL(style);
frontend.render(map);