X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=mix_effect_test.cpp;h=b5082846abc13e6ec76ff37d9dfe1ec6b7032ab7;hp=096ecd5ae03169ee5e9052bfe2207a0140cc6f53;hb=eff011224abc5dc81f801f3ea44572287a55bcac;hpb=6a8b7d750dff76dee320ad973a52d4d9720510b9 diff --git a/mix_effect_test.cpp b/mix_effect_test.cpp index 096ecd5..b508284 100644 --- a/mix_effect_test.cpp +++ b/mix_effect_test.cpp @@ -1,8 +1,15 @@ // Unit tests for MixEffect. -#include "test_util.h" +#include + +#include "effect_chain.h" #include "gtest/gtest.h" +#include "image_format.h" +#include "input.h" #include "mix_effect.h" +#include "test_util.h" + +namespace movit { TEST(MixEffectTest, FiftyFiftyMix) { float data_a[] = { @@ -95,7 +102,7 @@ TEST(MixEffectTest, AdditiveBlendingWorksForBothTotallyOpaqueAndPartiallyTranslu 1.0f, 1.0f, 1.0f, 0.7f, }; - float out_data[4]; + float out_data[8]; EffectChainTester tester(data_a, 1, 2, FORMAT_RGBA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_LINEAR); Effect *input1 = tester.get_chain()->last_added_effect(); Effect *input2 = tester.add_input(data_b, FORMAT_RGBA_POSTMULTIPLIED_ALPHA, COLORSPACE_sRGB, GAMMA_LINEAR); @@ -133,3 +140,5 @@ TEST(MixEffectTest, MixesLinearlyDespitesRGBInputsAndOutputs) { expect_equal(expected_data, out_data, 2, 2); } + +} // namespace movit