X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=mix_effect_test.cpp;h=b5082846abc13e6ec76ff37d9dfe1ec6b7032ab7;hp=babb76630dd185cdea4613ff8fc93dc581666d54;hb=5ee3e6bb0bf100d57a06911b89c3a0a0dc49e2be;hpb=37f56fcbe571b2322243f6de59494bf9e0cbb37a diff --git a/mix_effect_test.cpp b/mix_effect_test.cpp index babb766..b508284 100644 --- a/mix_effect_test.cpp +++ b/mix_effect_test.cpp @@ -1,6 +1,6 @@ // Unit tests for MixEffect. -#include +#include #include "effect_chain.h" #include "gtest/gtest.h" @@ -9,6 +9,8 @@ #include "mix_effect.h" #include "test_util.h" +namespace movit { + TEST(MixEffectTest, FiftyFiftyMix) { float data_a[] = { 0.0f, 0.25f, @@ -100,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); @@ -138,3 +140,5 @@ TEST(MixEffectTest, MixesLinearlyDespitesRGBInputsAndOutputs) { expect_equal(expected_data, out_data, 2, 2); } + +} // namespace movit