diff --git a/tests/suite1-main.cc b/tests/suite1-main.cc index ecff6236d..40ccba247 100644 --- a/tests/suite1-main.cc +++ b/tests/suite1-main.cc @@ -3,6 +3,7 @@ #include #include #include "ipc.hh" +#include "testresampler.hh" #define DEBUG(...) do { break; Bse::printerr (__VA_ARGS__); } while (0) @@ -188,14 +189,11 @@ main (int argc, char *argv[]) bench_aida(); return 0; } - /* NEVER inline prototypes, ALWAYS use a header file! - * if (argc >= 2 && argv[1] && std::string ("--resampler") == argv[1]) - * { - * Bse::init_async (&argc, argv, argv[0], args); - * extern int test_resampler (int, char **); - * return test_resampler (argc, argv); - * } - */ + if (argc >= 2 && argv[1] && std::string ("--resampler") == argv[1]) + { + Bse::init_async (&argc, argv, argv[0], args); + return test_resampler (argc, argv); + } // run tests return bse_init_and_test (&argc, argv, [&]() { return test_main (argc, argv); }, args); } diff --git a/tests/testresampler.cc b/tests/testresampler.cc index 1158a1f26..18e31b311 100644 --- a/tests/testresampler.cc +++ b/tests/testresampler.cc @@ -6,6 +6,7 @@ #include #include #include "bse/internal.hh" +#include "testresampler.hh" #include #include #include @@ -904,8 +905,6 @@ TEST_PERF (testresampler_check_performance_sub24); static void testresampler_check_performance_over24() { run_perf (RES_OVERSAMPLE, 24); } TEST_PERF (testresampler_check_performance_over24); -int test_resampler (int argc, char **argv); - int test_resampler (int argc, char **argv) { diff --git a/tests/testresampler.hh b/tests/testresampler.hh new file mode 100644 index 000000000..39364212d --- /dev/null +++ b/tests/testresampler.hh @@ -0,0 +1,7 @@ +// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html +#ifndef __TEST_RESAMPLER_HH__ +#define __TEST_RESAMPLER_HH__ + +int test_resampler (int argc, char **argv); + +#endif