summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
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);