X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=dither_effect_test.cpp;h=210a2e721e999047357b212a177863005b9e1fbd;hb=8c7e53028a3ef4805d2608643041a5d7e6bd1b6e;hp=81f6a2402d6d677e25c2e22727308ead45c491fd;hpb=ff9e68a3f5abb179bd7bf9fb84df48327f148583;p=movit diff --git a/dither_effect_test.cpp b/dither_effect_test.cpp index 81f6a24..210a2e7 100644 --- a/dither_effect_test.cpp +++ b/dither_effect_test.cpp @@ -1,9 +1,14 @@ // Unit tests for DitherEffect. +#include #include -#include "test_util.h" +#include "effect_chain.h" #include "gtest/gtest.h" +#include "image_format.h" +#include "test_util.h" + +namespace movit { TEST(DitherEffectTest, NoDitherOnExactValues) { const int size = 4; @@ -50,5 +55,7 @@ TEST(DitherEffectTest, SinusoidBelowOneLevelComesThrough) { sum += 2.0 * (int(out_data[i]) - 0.2*255.0) * sin(i * frequency); } - EXPECT_NEAR(amplitude, sum / (size * 255.0f), 1e-5); + EXPECT_NEAR(amplitude, sum / (size * 255.0f), 1.1e-5); } + +} // namespace movit