summaryrefslogtreecommitdiff
path: root/test/api/api_misuse.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/api/api_misuse.test.cpp')
-rw-r--r--test/api/api_misuse.test.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/api/api_misuse.test.cpp b/test/api/api_misuse.test.cpp
index eb271b0258..34272f5366 100644
--- a/test/api/api_misuse.test.cpp
+++ b/test/api/api_misuse.test.cpp
@@ -3,10 +3,10 @@
#include <mbgl/test/fixture_log_observer.hpp>
#include <mbgl/map/map.hpp>
-#include <mbgl/platform/default/headless_backend.hpp>
-#include <mbgl/platform/default/offscreen_view.hpp>
+#include <mbgl/gl/headless_backend.hpp>
+#include <mbgl/gl/offscreen_view.hpp>
#include <mbgl/storage/online_file_source.hpp>
-#include <mbgl/platform/default/thread_pool.hpp>
+#include <mbgl/util/default_thread_pool.hpp>
#include <mbgl/util/exception.hpp>
#include <mbgl/util/run_loop.hpp>
@@ -14,19 +14,20 @@
using namespace mbgl;
+
TEST(API, RenderWithoutCallback) {
auto log = new FixtureLogObserver();
Log::setObserver(std::unique_ptr<Log::Observer>(log));
util::RunLoop loop;
- HeadlessBackend backend;
- OffscreenView view(backend.getContext(), {{ 128, 512 }});
+ HeadlessBackend backend { test::sharedDisplay() };
+ OffscreenView view { backend.getContext(), { 128, 512 } };
StubFileSource fileSource;
ThreadPool threadPool(4);
std::unique_ptr<Map> map =
- std::make_unique<Map>(backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still);
+ std::make_unique<Map>(backend, view.size, 1, fileSource, threadPool, MapMode::Still);
map->renderStill(view, nullptr);
// Force Map thread to join.
@@ -45,12 +46,12 @@ TEST(API, RenderWithoutCallback) {
TEST(API, RenderWithoutStyle) {
util::RunLoop loop;
- HeadlessBackend backend;
- OffscreenView view(backend.getContext(), {{ 128, 512 }});
+ HeadlessBackend backend { test::sharedDisplay() };
+ OffscreenView view { backend.getContext(), { 128, 512 } };
StubFileSource fileSource;
ThreadPool threadPool(4);
- Map map(backend, view.getSize(), 1, fileSource, threadPool, MapMode::Still);
+ Map map(backend, view.size, 1, fileSource, threadPool, MapMode::Still);
std::exception_ptr error;
map.renderStill(view, [&](std::exception_ptr error_) {