Browse Source

DebugTools: harden the test for screenshot().

pull/324/head
Vladimír Vondruš 7 years ago
parent
commit
efcc4e0d1c
  1. 10
      src/Magnum/DebugTools/Test/ScreenshotGLTest.cpp

10
src/Magnum/DebugTools/Test/ScreenshotGLTest.cpp

@ -114,6 +114,8 @@ void ScreenshotGLTest::rgba8() {
GL::Framebuffer framebuffer{{{}, {4, 3}}};
framebuffer.attachTexture(GL::Framebuffer::ColorAttachment{0}, texture, 0);
CORRADE_COMPARE(framebuffer.checkStatus(GL::FramebufferTarget::Read), GL::Framebuffer::Status::Complete);
std::string file = Utility::Directory::join(SCREENSHOT_TEST_DIR, "image.tga");
if(Utility::Directory::exists(file))
CORRADE_VERIFY(Utility::Directory::rm(file));
@ -162,6 +164,8 @@ void ScreenshotGLTest::r8() {
GL::Framebuffer framebuffer{{{}, {4, 3}}};
framebuffer.attachTexture(GL::Framebuffer::ColorAttachment{0}, texture, 0);
CORRADE_COMPARE(framebuffer.checkStatus(GL::FramebufferTarget::Read), GL::Framebuffer::Status::Complete);
std::string file = Utility::Directory::join(SCREENSHOT_TEST_DIR, "image.tga");
if(Utility::Directory::exists(file))
CORRADE_VERIFY(Utility::Directory::rm(file));
@ -198,6 +202,8 @@ void ScreenshotGLTest::unknownFormat() {
GL::Framebuffer framebuffer{{{}, {4, 3}}};
framebuffer.attachTexture(GL::Framebuffer::ColorAttachment{0}, texture, 0);
CORRADE_COMPARE(framebuffer.checkStatus(GL::FramebufferTarget::Read), GL::Framebuffer::Status::Complete);
std::ostringstream out;
bool succeeded;
{
@ -225,6 +231,8 @@ void ScreenshotGLTest::pluginLoadFailed() {
GL::Framebuffer framebuffer{{{}, {4, 3}}};
framebuffer.attachTexture(GL::Framebuffer::ColorAttachment{0}, texture, 0);
CORRADE_COMPARE(framebuffer.checkStatus(GL::FramebufferTarget::Read), GL::Framebuffer::Status::Complete);
std::ostringstream out;
bool succeeded;
{
@ -257,6 +265,8 @@ void ScreenshotGLTest::saveFailed() {
GL::Framebuffer framebuffer{{{}, {4, 3}}};
framebuffer.attachTexture(GL::Framebuffer::ColorAttachment{0}, texture, 0);
CORRADE_COMPARE(framebuffer.checkStatus(GL::FramebufferTarget::Read), GL::Framebuffer::Status::Complete);
std::ostringstream out;
bool succeeded;
{

Loading…
Cancel
Save