summaryrefslogtreecommitdiff
path: root/test/renderer/backend_scope.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/renderer/backend_scope.test.cpp')
-rw-r--r--test/renderer/backend_scope.test.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/test/renderer/backend_scope.test.cpp b/test/renderer/backend_scope.test.cpp
index 06bf1e7750..66cf88a9c6 100644
--- a/test/renderer/backend_scope.test.cpp
+++ b/test/renderer/backend_scope.test.cpp
@@ -12,6 +12,10 @@ public:
void bind() override {
}
+ mbgl::Size getFramebufferSize() const override {
+ return mbgl::Size{};
+ }
+
void activate() override {
if (activateFunction) activateFunction();
}
@@ -87,15 +91,15 @@ TEST(BackendScope, NestedScopes) {
TEST(BackendScope, ChainedScopes) {
bool activatedA = false;
bool activatedB = false;
-
+
StubRendererBackend backendA;
backendA.activateFunction = [&] { activatedA = true; };
backendA.deactivateFunction = [&] { activatedA = false; };
-
+
StubRendererBackend backendB;
backendB.activateFunction = [&] { activatedB = true; };
backendB.deactivateFunction = [&] { activatedB = false; };
-
+
{
BackendScope scopeA { backendA };
ASSERT_TRUE(activatedA);
@@ -107,7 +111,7 @@ TEST(BackendScope, ChainedScopes) {
ASSERT_FALSE(activatedB);
ASSERT_TRUE(activatedA);
}
-
+
ASSERT_FALSE(activatedA);
ASSERT_FALSE(activatedB);
}