Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TESTS: testresampler: add header file for test_resampler prototype #126

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 6 additions & 8 deletions tests/suite1-main.cc
Expand Up @@ -3,6 +3,7 @@
#include <bse/bsemain.hh>
#include <bse/bse.hh>
#include "ipc.hh"
#include "testresampler.hh"

#define DEBUG(...) do { break; Bse::printerr (__VA_ARGS__); } while (0)

Expand Down Expand Up @@ -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);
}
Expand Down
3 changes: 1 addition & 2 deletions tests/testresampler.cc
Expand Up @@ -6,6 +6,7 @@
#include <bse/bsemathsignal.hh>
#include <bse/gslfft.hh>
#include "bse/internal.hh"
#include "testresampler.hh"
#include <stdio.h>
#include <math.h>
#include <sys/time.h>
Expand Down Expand Up @@ -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)
{
Expand Down
7 changes: 7 additions & 0 deletions 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