From 150a47435d60ec98ec4f71dd76679441f92a67dc Mon Sep 17 00:00:00 2001 From: Ari Koivula Date: Wed, 30 Jul 2014 15:26:20 +0300 Subject: [PATCH] Add missing files. --- tests/test_strategies.c | 28 ++++++++++++++++++++++++++++ tests/test_strategies.h | 10 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/test_strategies.c create mode 100644 tests/test_strategies.h 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_