[beast: 1/15] BSE: use Bse::Test (alias) instead of Rapicorn::Test
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 1/15] BSE: use Bse::Test (alias) instead of Rapicorn::Test
- Date: Sun, 23 Jul 2017 18:57:54 +0000 (UTC)
commit dee4063e02691dbe9025041b425a54a0c67112fe
Author: Tim Janik <timj gnu org>
Date: Tue Jul 18 02:00:53 2017 +0200
BSE: use Bse::Test (alias) instead of Rapicorn::Test
Signed-off-by: Tim Janik <timj gnu org>
bse/bsemain.cc | 2 +-
bse/tests/blocktests.cc | 18 +++++++++---------
bse/tests/filtertest.cc | 2 +-
bse/tests/firhandle.cc | 4 ++--
bse/tests/resamplehandle.cc | 6 +++---
bse/tests/testfft.cc | 22 +++++++++++-----------
tests/bse/filtertest.cc | 4 ++--
tests/testwavechunk.cc | 2 +-
8 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/bse/bsemain.cc b/bse/bsemain.cc
index 54bb0a1..43c5dc9 100644
--- a/bse/bsemain.cc
+++ b/bse/bsemain.cc
@@ -20,7 +20,7 @@
#include <sfi/sfitests.hh> /* sfti_test_init() */
using namespace Bse;
-namespace Test = Rapicorn::Test;
+namespace Test = Bse::Test;
/* --- prototypes --- */
static void init_parse_args (int *argc_p, char **argv_p, BseMainArgs *margs, const Bse::StringVector
&args);
diff --git a/bse/tests/blocktests.cc b/bse/tests/blocktests.cc
index 7ca118d..a0a51f8 100644
--- a/bse/tests/blocktests.cc
+++ b/bse/tests/blocktests.cc
@@ -222,7 +222,7 @@ bench_fill ()
for (uint j = 0; j < RUNS; j++)
Bse::Block::fill (BLOCK_SIZE, fblock, 2.f);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::fill # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -239,7 +239,7 @@ bench_copy (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::copy (BLOCK_SIZE, dest_fblock, src_fblock);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::copy # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -256,7 +256,7 @@ bench_add (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::add (BLOCK_SIZE, fblock1, fblock2);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::add # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -273,7 +273,7 @@ bench_sub (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::sub (BLOCK_SIZE, fblock1, fblock2);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::sub # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -290,7 +290,7 @@ bench_mul (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::mul (BLOCK_SIZE, fblock1, fblock2);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::mul # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -307,7 +307,7 @@ bench_scale (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::scale (BLOCK_SIZE, fblock1, fblock2, 2.f);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::scale # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -330,7 +330,7 @@ bench_range (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::range (BLOCK_SIZE, fblock, min_value, max_value);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
assert_return (min_value == correct_min_value);
assert_return (max_value == correct_max_value);
@@ -348,7 +348,7 @@ bench_square_sum (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::square_sum (BLOCK_SIZE, fblock);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
TPASS ("Block::sumĀ² # timing: fastest=%fs throughput=%.1fMB/s\n", bench_time, bytes_per_loop /
bench_time / 1048576.);
}
@@ -371,7 +371,7 @@ bench_range_and_square_sum (void)
for (uint j = 0; j < RUNS; j++)
Bse::Block::range_and_square_sum (BLOCK_SIZE, fblock, min_value, max_value);
};
- Rapicorn::Test::Timer timer (MAX_SECONDS);
+ Bse::Test::Timer timer (MAX_SECONDS);
const double bench_time = timer.benchmark (loop);
assert_return (min_value == correct_min_value);
assert_return (max_value == correct_max_value);
diff --git a/bse/tests/filtertest.cc b/bse/tests/filtertest.cc
index 142c95a..9a738e2 100644
--- a/bse/tests/filtertest.cc
+++ b/bse/tests/filtertest.cc
@@ -12,7 +12,7 @@
#include <complex>
using namespace Bse;
-using namespace Rapicorn::Test;
+using namespace Bse::Test;
using std::max;
using std::min;
diff --git a/bse/tests/firhandle.cc b/bse/tests/firhandle.cc
index d4a04c8..76c26c4 100644
--- a/bse/tests/firhandle.cc
+++ b/bse/tests/firhandle.cc
@@ -12,7 +12,7 @@
using namespace Bse;
-using namespace Rapicorn::Test;
+using namespace Bse::Test;
using std::vector;
using std::min;
using std::max;
@@ -244,7 +244,7 @@ test_with_sine_sweep (FirHandleType type)
for (uint j = 0; j < RUNS; j++)
read_through (fir_handle_sin);
};
- Rapicorn::Test::Timer timer (0.03);
+ Bse::Test::Timer timer (0.03);
const double bench_time = timer.benchmark (loop);
String name = string_format ("%s O64 mono", handle_name (type));
const double samples_per_second = RUNS * sweep_sin.size() / bench_time;
diff --git a/bse/tests/resamplehandle.cc b/bse/tests/resamplehandle.cc
index fcdd211..3a52ad0 100644
--- a/bse/tests/resamplehandle.cc
+++ b/bse/tests/resamplehandle.cc
@@ -16,7 +16,7 @@ using std::string;
using std::max;
using std::min;
using std::map;
-using namespace Rapicorn::Test;
+using namespace Bse::Test;
static void
read_through (GslDataHandle *handle)
@@ -93,7 +93,7 @@ check (const char *up_down,
worst_diff = max (fabs (resampled - expected[i]), worst_diff);
}
worst_diff_db = bse_db_from_factor (worst_diff, -200);
- Rapicorn::Test::tprintout ("%s: linear(%dst read) read worst_diff = %f (%f dB)\n", samplestr, repeat,
worst_diff, worst_diff_db);
+ Bse::Test::tprintout ("%s: linear(%dst read) read worst_diff = %f (%f dB)\n", samplestr, repeat,
worst_diff, worst_diff_db);
TASSERT (worst_diff_db < max_db);
}
@@ -124,7 +124,7 @@ check (const char *up_down,
for (uint j = 0; j < RUNS; j++)
read_through (rhandle);
};
- Rapicorn::Test::Timer timer (0.03);
+ Bse::Test::Timer timer (0.03);
const double bench_time = timer.benchmark (loop);
const double input_samples_per_second = RUNS * input.size() / bench_time;
const double output_samples_per_second = RUNS * gsl_data_handle_n_values (rhandle) / bench_time;
diff --git a/bse/tests/testfft.cc b/bse/tests/testfft.cc
index fe276ff..67d5517 100644
--- a/bse/tests/testfft.cc
+++ b/bse/tests/testfft.cc
@@ -186,21 +186,21 @@ diff (uint m, uint p, double *a1, double *a2, const char *str)
{
double a = ABS (a1[n] - a2[n]);
if (n < p)
- Rapicorn::Test::tprintout (" TESTFFT %3u:%.3f) % 19.9f - % 19.9f = % 19.9f (% 19.9f)\n",
- n, ((float) n) / (float) m,
- a1[n], a2[n],
- a1[n] - a2[n],
- a1[n] / a2[n]);
+ Bse::Test::tprintout (" TESTFFT %3u:%.3f) % 19.9f - % 19.9f = % 19.9f (% 19.9f)\n",
+ n, ((float) n) / (float) m,
+ a1[n], a2[n],
+ a1[n] - a2[n],
+ a1[n] / a2[n]);
d += a;
max = MAX (max, a);
min = MIN (min, a);
}
- Rapicorn::Test::tprintout (" TESTFFT Diff sum: %.9f, ", d);
- Rapicorn::Test::tprintout ("min/av/max: %.9f %.9f %.9f, ", min, d / (double) m, max);
- Rapicorn::Test::tprintout ("noise: %u %u %u\n",
- g_bit_storage (1. / min),
- g_bit_storage (m / d),
- g_bit_storage (1. / max));
+ Bse::Test::tprintout (" TESTFFT Diff sum: %.9f, ", d);
+ Bse::Test::tprintout ("min/av/max: %.9f %.9f %.9f, ", min, d / (double) m, max);
+ Bse::Test::tprintout ("noise: %u %u %u\n",
+ g_bit_storage (1. / min),
+ g_bit_storage (m / d),
+ g_bit_storage (1. / max));
return d;
}
diff --git a/tests/bse/filtertest.cc b/tests/bse/filtertest.cc
index db7f6e6..b0cabe7 100644
--- a/tests/bse/filtertest.cc
+++ b/tests/bse/filtertest.cc
@@ -482,7 +482,7 @@ setup_all_filter_tests (vector<FilterTest>& filter_tests)
static void
check_computed_response (const vector<FilterTest>& filter_tests)
{
- Rapicorn::Test::tprintout ("---> checking computed filter responses:\n");
+ Bse::Test::tprintout ("---> checking computed filter responses:\n");
for (vector<FilterTest>::const_iterator fi = filter_tests.begin(); fi != filter_tests.end(); fi++)
fi->perform_checks (FilterTest::TEST_COMPUTED_RESPONSE, 10000);
}
@@ -490,7 +490,7 @@ check_computed_response (const vector<FilterTest>& filter_tests)
static void
check_scanned_response (const vector<FilterTest>& filter_tests)
{
- Rapicorn::Test::tprintout ("---> checking scanned filter responses:\n");
+ Bse::Test::tprintout ("---> checking scanned filter responses:\n");
for (vector<FilterTest>::const_iterator fi = filter_tests.begin(); fi != filter_tests.end(); fi++)
fi->perform_checks (FilterTest::TEST_SCANNED_RESPONSE, 67); /* prime number scan points */
}
diff --git a/tests/testwavechunk.cc b/tests/testwavechunk.cc
index 4aaff2d..2badf58 100644
--- a/tests/testwavechunk.cc
+++ b/tests/testwavechunk.cc
@@ -368,7 +368,7 @@ main (gint argc,
reversed_datahandle_test();
simple_loop_tests();
multi_channel_tests();
- if (Rapicorn::Test::slow())
+ if (Bse::Test::slow())
brute_force_loop_tests();
return 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]