diff options
Diffstat (limited to 'test/gl')
-rw-r--r-- | test/gl/object.test.cpp | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/test/gl/object.test.cpp b/test/gl/object.test.cpp index 45a69b4c71..fb143c55c8 100644 --- a/test/gl/object.test.cpp +++ b/test/gl/object.test.cpp @@ -7,6 +7,8 @@ #include <memory> +using namespace mbgl; + namespace { static bool getFlag = false; @@ -27,7 +29,7 @@ TEST(GLObject, PreserveState) { getFlag = false; setFlag = false; - auto object = std::make_unique<mbgl::gl::PreserveState<MockGLObject>>(); + auto object = std::make_unique<gl::PreserveState<MockGLObject>>(); EXPECT_TRUE(getFlag); EXPECT_FALSE(setFlag); @@ -40,7 +42,7 @@ TEST(GLObject, PreserveState) { TEST(GLObject, Value) { setFlag = false; - auto object = std::make_unique<mbgl::gl::State<MockGLObject>>(); + auto object = std::make_unique<gl::State<MockGLObject>>(); EXPECT_EQ(object->getCurrentValue(), false); EXPECT_TRUE(object->isDirty()); EXPECT_FALSE(setFlag); @@ -58,27 +60,13 @@ TEST(GLObject, Value) { } TEST(GLObject, Store) { - mbgl::HeadlessBackend backend; - mbgl::OffscreenView view(backend.getContext()); - - mbgl::gl::Context context; - EXPECT_TRUE(context.empty()); + HeadlessBackend backend; + OffscreenView view(backend.getContext()); - mbgl::gl::UniqueProgram program = context.createProgram(); - EXPECT_NE(program.get(), 0u); - program.reset(); - EXPECT_FALSE(context.empty()); - context.performCleanup(); - EXPECT_TRUE(context.empty()); - - mbgl::gl::UniqueShader shader = context.createVertexShader(); - EXPECT_NE(shader.get(), 0u); - shader.reset(); - EXPECT_FALSE(context.empty()); - context.performCleanup(); + gl::Context context; EXPECT_TRUE(context.empty()); - mbgl::gl::UniqueTexture texture = context.createTexture(); + gl::UniqueTexture texture = context.createTexture(); EXPECT_NE(texture.get(), 0u); texture.reset(); EXPECT_FALSE(context.empty()); |