]> git.sesse.net Git - movit/commitdiff
Add a few check_error() calls.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Mar 2014 20:14:22 +0000 (21:14 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 20 Mar 2014 20:43:46 +0000 (21:43 +0100)
dither_effect_test.cpp
effect_chain_test.cpp

index 210a2e721e999047357b212a177863005b9e1fbd..1b72ecb5caec50c93d3ad34fc56a2e09ef390e26 100644 (file)
@@ -7,6 +7,7 @@
 #include "gtest/gtest.h"
 #include "image_format.h"
 #include "test_util.h"
+#include "util.h"
 
 namespace movit {
 
@@ -28,8 +29,11 @@ TEST(DitherEffectTest, NoDitherOnExactValues) {
        unsigned char out_data[size * size];
 
        EffectChainTester tester(data, size, size, FORMAT_GRAYSCALE, COLORSPACE_sRGB, GAMMA_LINEAR, GL_RGBA8);
+       check_error();
        tester.get_chain()->set_dither_bits(8);
+       check_error();
        tester.run(out_data, GL_RED, COLORSPACE_sRGB, GAMMA_LINEAR);
+       check_error();
 
        expect_equal(expected_data, out_data, size, size);
 }
index 70701b35095511d19c45a5bf39a7e14668d004a0..f50d2ead3685db68703d7df412a9e2cb7cf3361b 100644 (file)
@@ -1024,7 +1024,9 @@ TEST(EffectChainTest, IdentityWithOwnPool) {
        chain.render_to_fbo(fbo, width, height);
 
        glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+       check_error();
        glReadPixels(0, 0, width, height, GL_RED, GL_FLOAT, out_data);
+       check_error();
 
        expect_equal(expected_data, out_data, width, height);