X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=effect_chain_test.cpp;h=67b3dfc56aa7567678624884818242b40b1d5487;hb=8c7e53028a3ef4805d2608643041a5d7e6bd1b6e;hp=fed8b91b693f42ef6796307d3039d3d29d668663;hpb=85f9719bf3519b1f1942738d11601584f5d38725;p=movit diff --git a/effect_chain_test.cpp b/effect_chain_test.cpp index fed8b91..67b3dfc 100644 --- a/effect_chain_test.cpp +++ b/effect_chain_test.cpp @@ -2,13 +2,14 @@ // // Note that this also contains the tests for some of the simpler effects. -#include +#include #include #include "effect.h" #include "effect_chain.h" #include "flat_input.h" #include "gtest/gtest.h" +#include "init.h" #include "input.h" #include "mirror_effect.h" #include "multiply_effect.h" @@ -18,6 +19,8 @@ using namespace std; +namespace movit { + TEST(EffectChainTest, EmptyChain) { float data[] = { 0.0f, 0.25f, 0.3f, @@ -957,8 +960,6 @@ TEST(EffectChainTest, VirtualSizeIsSentOnToInputs) { expect_equal(data, out_data, size, size); } -extern bool movit_initialized; - // Does not use EffectChainTest, so that it can construct an EffectChain without // a shared ResourcePool (which is also properly destroyed afterwards). // Also turns on debugging to test that code path. @@ -975,8 +976,7 @@ TEST(EffectChainTest, IdentityWithOwnPool) { float out_data[6]; EffectChain chain(width, height); - movit_initialized = false; - init_movit(".", MOVIT_DEBUG_ON); + movit_debug_level = MOVIT_DEBUG_ON; ImageFormat format; format.color_space = COLORSPACE_sRGB; @@ -1019,6 +1019,7 @@ TEST(EffectChainTest, IdentityWithOwnPool) { expect_equal(expected_data, out_data, width, height); // Reset the debug status again. - movit_initialized = false; - init_movit(".", MOVIT_DEBUG_OFF); + movit_debug_level = MOVIT_DEBUG_OFF; } + +} // namespace movit