summaryrefslogtreecommitdiff
path: root/test/gl/object.test.cpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-10-10 17:16:37 +0200
committerKonstantin Käfer <mail@kkaefer.com>2016-10-25 13:52:36 -0700
commita4d259c33f9bb890bba97fd89552720e3e0ec09b (patch)
tree342ecc27a6993c48f3a2e1d739fce890350bc44d /test/gl/object.test.cpp
parent5cc390d694fc7510d445310d8eb9e32429a5e67b (diff)
downloadqtlocation-mapboxgl-a4d259c33f9bb890bba97fd89552720e3e0ec09b.tar.gz
[core] move gl::Context to Backend and refactor View
Diffstat (limited to 'test/gl/object.test.cpp')
-rw-r--r--test/gl/object.test.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/gl/object.test.cpp b/test/gl/object.test.cpp
index 1f9d48cff7..a3457d28c6 100644
--- a/test/gl/object.test.cpp
+++ b/test/gl/object.test.cpp
@@ -1,7 +1,7 @@
#include <mbgl/test/util.hpp>
#include <mbgl/platform/default/headless_backend.hpp>
-#include <mbgl/platform/default/headless_view.hpp>
+#include <mbgl/platform/default/offscreen_view.hpp>
#include <mbgl/gl/gl.hpp>
#include <mbgl/gl/context.hpp>
@@ -43,11 +43,8 @@ TEST(GLObject, Value) {
auto object = std::make_unique<mbgl::gl::State<MockGLObject>>();
EXPECT_EQ(object->getCurrentValue(), false);
- EXPECT_FALSE(object->isDirty());
- EXPECT_FALSE(setFlag);
-
- object->setDirty();
EXPECT_TRUE(object->isDirty());
+ EXPECT_FALSE(setFlag);
*object = false;
EXPECT_EQ(object->getCurrentValue(), false);
@@ -59,16 +56,11 @@ TEST(GLObject, Value) {
EXPECT_EQ(object->getCurrentValue(), true);
EXPECT_FALSE(object->isDirty());
EXPECT_TRUE(setFlag);
-
- object->reset();
- EXPECT_EQ(object->getCurrentValue(), false);
- EXPECT_FALSE(object->isDirty());
- EXPECT_TRUE(setFlag);
}
TEST(GLObject, Store) {
mbgl::HeadlessBackend backend;
- mbgl::HeadlessView view;
+ mbgl::OffscreenView view(backend.getContext());
mbgl::gl::Context context;
EXPECT_TRUE(context.empty());