X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=dither_effect_test.cpp;h=18b286ed3e3210c4fa0c0546b1739f5df4759baf;hp=6fd46dbf402feba053183e16790157602dd91277;hb=131e7179b596f8268fd80c32312849da83581e55;hpb=37f56fcbe571b2322243f6de59494bf9e0cbb37a diff --git a/dither_effect_test.cpp b/dither_effect_test.cpp index 6fd46db..18b286e 100644 --- a/dither_effect_test.cpp +++ b/dither_effect_test.cpp @@ -7,6 +7,9 @@ #include "gtest/gtest.h" #include "image_format.h" #include "test_util.h" +#include "util.h" + +namespace movit { TEST(DitherEffectTest, NoDitherOnExactValues) { const int size = 4; @@ -26,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); } @@ -55,3 +61,5 @@ TEST(DitherEffectTest, SinusoidBelowOneLevelComesThrough) { EXPECT_NEAR(amplitude, sum / (size * 255.0f), 1.1e-5); } + +} // namespace movit