diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2016-09-27 12:27:35 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-09-27 11:03:29 -0700 |
commit | 21386b31465302d63cae5d93680442555c8560f1 (patch) | |
tree | 1220ea780dcbc6d79b83f476900a6f12cb3f71fc /test/gl | |
parent | e881795ed10484ecfe8de73aaaa349c44eb259db (diff) | |
download | qtlocation-mapboxgl-21386b31465302d63cae5d93680442555c8560f1.tar.gz |
[core] move GL value accessors to gl::value namespace
Diffstat (limited to 'test/gl')
-rw-r--r-- | test/gl/object.cpp | 25 |
1 files changed, 12 insertions, 13 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); } |