summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2016-09-27 12:27:35 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-09-27 11:03:29 -0700
commit21386b31465302d63cae5d93680442555c8560f1 (patch)
tree1220ea780dcbc6d79b83f476900a6f12cb3f71fc /test
parente881795ed10484ecfe8de73aaaa349c44eb259db (diff)
downloadqtlocation-mapboxgl-21386b31465302d63cae5d93680442555c8560f1.tar.gz
[core] move GL value accessors to gl::value namespace
Diffstat (limited to 'test')
-rw-r--r--test/gl/object.cpp25
-rw-r--r--test/util/offscreen_texture.cpp2
2 files changed, 13 insertions, 14 deletions
diff --git a/test/gl/object.cpp b/test/gl/object.cpp
index 5733a15e4f..68cd2ddead 100644
--- a/test/gl/object.cpp
+++ b/test/gl/object.cpp
@@ -4,7 +4,6 @@
#include <mbgl/platform/default/headless_view.hpp>
#include <mbgl/gl/gl.hpp>
-#include <mbgl/gl/gl_helper.hpp>
#include <mbgl/gl/gl_config.hpp>
#include <mbgl/gl/object_store.hpp>
@@ -26,11 +25,11 @@ struct MockGLObject {
const bool MockGLObject::Default = false;
-TEST(GLObject, Preserve) {
+TEST(GLObject, PreserveState) {
getFlag = false;
setFlag = false;
- auto object = std::make_unique<mbgl::gl::Preserve<MockGLObject>>();
+ auto object = std::make_unique<mbgl::gl::PreserveState<MockGLObject>>();
EXPECT_TRUE(getFlag);
EXPECT_FALSE(setFlag);
@@ -43,28 +42,28 @@ TEST(GLObject, Preserve) {
TEST(GLObject, Value) {
setFlag = false;
- auto object = std::make_unique<mbgl::gl::Value<MockGLObject>>();
- EXPECT_EQ(object->getCurrent(), false);
- EXPECT_FALSE(object->getDirty());
+ 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->getDirty());
+ EXPECT_TRUE(object->isDirty());
*object = false;
- EXPECT_EQ(object->getCurrent(), false);
- EXPECT_FALSE(object->getDirty());
+ EXPECT_EQ(object->getCurrentValue(), false);
+ EXPECT_FALSE(object->isDirty());
EXPECT_TRUE(setFlag);
setFlag = false;
*object = true;
- EXPECT_EQ(object->getCurrent(), true);
- EXPECT_FALSE(object->getDirty());
+ EXPECT_EQ(object->getCurrentValue(), true);
+ EXPECT_FALSE(object->isDirty());
EXPECT_TRUE(setFlag);
object->reset();
- EXPECT_EQ(object->getCurrent(), false);
- EXPECT_FALSE(object->getDirty());
+ EXPECT_EQ(object->getCurrentValue(), false);
+ EXPECT_FALSE(object->isDirty());
EXPECT_TRUE(setFlag);
}
diff --git a/test/util/offscreen_texture.cpp b/test/util/offscreen_texture.cpp
index 74a616134e..b4d98078b3 100644
--- a/test/util/offscreen_texture.cpp
+++ b/test/util/offscreen_texture.cpp
@@ -130,7 +130,7 @@ void main() {
test::checkImage("test/fixtures/offscreen_texture/render-to-texture", image, 0, 0);
// Now reset the FBO back to normal and retrieve the original (restored) framebuffer.
- config.reset();
+ config.resetState();
image = view.readStillImage();
test::checkImage("test/fixtures/offscreen_texture/render-to-fbo", image, 0, 0);