summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-05-22 15:56:05 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-06-26 10:32:06 -0700
commit84e2ea886dc55917a1d6b665337fff6d3862984a (patch)
tree75d7411f09f48aa8b35be9348bc3687cb4efb1f8 /test
parent740281cc89e99fbbedf07fcf62253ada84f60776 (diff)
downloadqtlocation-mapboxgl-84e2ea886dc55917a1d6b665337fff6d3862984a.tar.gz
drive map rendering from main thread
Diffstat (limited to 'test')
-rw-r--r--test/fixtures/mock_view.hpp (renamed from test/style/mock_view.hpp)7
-rw-r--r--test/miscellaneous/transform.cpp13
-rw-r--r--test/style/resource_loading.cpp2
3 files changed, 6 insertions, 16 deletions
diff --git a/test/style/mock_view.hpp b/test/fixtures/mock_view.hpp
index 865cd2da55..dcbe3fef84 100644
--- a/test/style/mock_view.hpp
+++ b/test/fixtures/mock_view.hpp
@@ -1,5 +1,5 @@
-#ifndef TEST_RESOURCES_MOCK_VIEW
-#define TEST_RESOURCES_MOCK_VIEW
+#ifndef TEST_FIXTURES_MOCK_VIEW
+#define TEST_FIXTURES_MOCK_VIEW
#include <mbgl/map/view.hpp>
@@ -13,7 +13,8 @@ public:
void activate() override {};
void deactivate() override {};
void notify() override {};
- void invalidate(std::function<void()>) override {};
+ void invalidate() override {}
+ void swap() override {}
};
}
diff --git a/test/miscellaneous/transform.cpp b/test/miscellaneous/transform.cpp
index 6025cbce40..3c25c27057 100644
--- a/test/miscellaneous/transform.cpp
+++ b/test/miscellaneous/transform.cpp
@@ -1,4 +1,5 @@
#include "../fixtures/util.hpp"
+#include "../fixtures/mock_view.hpp"
#include <mbgl/util/run_loop.hpp>
#include <mbgl/map/map_data.hpp>
@@ -11,18 +12,6 @@
using namespace mbgl;
-class MockView : public View {
-public:
- void activate() override {
- }
- void deactivate() override {
- }
- void notify() override {
- }
- void invalidate(std::function<void()>) override {
- }
-};
-
TEST(Transform, InvalidScale) {
MockView view;
Transform transform(view);
diff --git a/test/style/resource_loading.cpp b/test/style/resource_loading.cpp
index 6c5eb51bd4..82784f673c 100644
--- a/test/style/resource_loading.cpp
+++ b/test/style/resource_loading.cpp
@@ -1,7 +1,7 @@
#include "../fixtures/fixture_log_observer.hpp"
#include "../fixtures/util.hpp"
+#include "../fixtures/mock_view.hpp"
#include "mock_file_source.hpp"
-#include "mock_view.hpp"
#include <mbgl/map/map_data.hpp>
#include <mbgl/map/transform_state.hpp>