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>
Fri, 21 Mar 2014 01:06:26 +0000 (02:06 +0100)
dither_effect_test.cpp
effect_chain_test.cpp

index 8801aa0..18b286e 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 66247c1..a760853 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);