diff --git a/tests/test_strategies.c b/tests/test_strategies.c new file mode 100644 index 00000000..e2c1a145 --- /dev/null +++ b/tests/test_strategies.c @@ -0,0 +1,28 @@ +#include "test_strategies.h" + +#include "src/strategyselector.h" + + +strategy_list strategies; + + +void init_test_strategies() +{ + strategies.allocated = 0; + strategies.count = 0; + strategies.strategies = NULL; + + // Init strategyselector because it sets hardware flags. + strategyselector_init(); + + // Collect all strategies to be tested. + if (!strategy_register_picture(&strategies)) { + fprintf(stderr, "strategy_register_picture failed!\n"); + return; + } + + if (!strategy_register_dct(&strategies)) { + fprintf(stderr, "strategy_register_partial_butterfly failed!\n"); + return; + } +} diff --git a/tests/test_strategies.h b/tests/test_strategies.h new file mode 100644 index 00000000..208b56cd --- /dev/null +++ b/tests/test_strategies.h @@ -0,0 +1,10 @@ +#ifndef TEST_STRATEGIES_H_ +#define TEST_STRATEGIES_H_ + +#include "src/strategyselector.h" + +extern strategy_list strategies; + +void init_test_strategies(); + +#endif // TEST_STRATEGIES_H_