[beast: 9/14] TESTS: use Bse diagnostics and BSE_CONVENIENCE
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 9/14] TESTS: use Bse diagnostics and BSE_CONVENIENCE
- Date: Thu, 23 Mar 2017 17:14:06 +0000 (UTC)
commit 0d5e48fc281e534eb30c1f68ecf8f5369b641f66
Author: Tim Janik <timj gnu org>
Date: Tue Mar 14 00:47:01 2017 +0100
TESTS: use Bse diagnostics and BSE_CONVENIENCE
Signed-off-by: Tim Janik <timj gnu org>
tests/Makefile.am | 4 ++--
tests/audio/Makefile.am | 2 +-
tests/bse/Makefile.am | 2 +-
tests/bse/filtertest.cc | 2 ++
tests/latency/Makefile.am | 2 +-
tests/testresampler.cc | 8 +++++---
tests/testresamplerq.cc | 3 +++
tests/testwavechunk.cc | 9 ++++++---
8 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 151eccb..0c12d93 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -5,8 +5,8 @@ SUBDIRS = . latency scripts bse audio filecheck
AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I.
DEFS += @DEFINE__FILE_DIR__@ -DG_LOG_DOMAIN="\"BEAST-TEST\"" # -DG_DISABLE_CONST_RETURNS
-AM_CXXFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DRAPICORN_CONVENIENCE
-AM_CFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DRAPICORN_CONVENIENCE
+AM_CXXFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DBSE_CONVENIENCE
+AM_CFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DBSE_CONVENIENCE
SFIDL = $(top_builddir)/sfi/sfidl
SFIDL_INC = --nostdinc -I$(top_srcdir) -I$(top_builddir)
diff --git a/tests/audio/Makefile.am b/tests/audio/Makefile.am
index 620929f..9b0a284 100644
--- a/tests/audio/Makefile.am
+++ b/tests/audio/Makefile.am
@@ -63,7 +63,7 @@ minisong-test:
$(Q) $(BSEFEXTRACT) $(@F).wav --cut-zeros --channel 0 --avg-spectrum --spectrum --avg-energy >
$(@F).tmp
$(Q) $(BSEFEXTRACT) $(@F).wav --cut-zeros --channel 1 --avg-spectrum --spectrum --avg-energy >>
$(@F).tmp
$(Q) $(BSEFCOMPARE) $(srcdir)/minisong.ref $(@F).tmp --threshold 98.00
- $(Q) rm -f $(@F).tmp $(@F).wav
+# $(Q) rm -f $(@F).tmp $(@F).wav
FEATURE_TESTS += syndrum-test
EXTRA_DIST += syndrum.bse syndrum.ref
diff --git a/tests/bse/Makefile.am b/tests/bse/Makefile.am
index c3d79cd..afc8aa1 100644
--- a/tests/bse/Makefile.am
+++ b/tests/bse/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I.
DEFS += @DEFINE__FILE_DIR__@ -DG_LOG_DOMAIN="\"BSE-TEST\"" # -DG_DISABLE_CONST_RETURNS
-AM_CXXFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DRAPICORN_CONVENIENCE
+AM_CXXFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DBSE_CONVENIENCE
#
# convenience targets for generated source files
diff --git a/tests/bse/filtertest.cc b/tests/bse/filtertest.cc
index bf0ef8e..db7f6e6 100644
--- a/tests/bse/filtertest.cc
+++ b/tests/bse/filtertest.cc
@@ -12,6 +12,8 @@
#include <stdlib.h>
#include <stdio.h>
+using namespace Bse;
+
using std::string;
using std::vector;
using std::set;
diff --git a/tests/latency/Makefile.am b/tests/latency/Makefile.am
index ffdb15e..7cc2509 100644
--- a/tests/latency/Makefile.am
+++ b/tests/latency/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl
AM_CPPFLAGS += -I$(top_srcdir) -I$(top_builddir) -I$(srcdir) -I.
DEFS += @DEFINE__FILE_DIR__@ -DG_LOG_DOMAIN="\"BSE-TEST\"" # -DG_DISABLE_CONST_RETURNS
-AM_CXXFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DRAPICORN_CONVENIENCE
+AM_CXXFLAGS += $(SFI_CPPFLAGS) $(RAPICORN_CFLAGS) -DBSE_CONVENIENCE
# IDL Compiler
SFIDL = $(top_builddir)/sfi/sfidl
diff --git a/tests/testresampler.cc b/tests/testresampler.cc
index 07000f4..71bbb91 100644
--- a/tests/testresampler.cc
+++ b/tests/testresampler.cc
@@ -16,6 +16,8 @@
#include <string>
#include <vector>
+using namespace Bse;
+
using std::string;
using std::vector;
using std::min;
@@ -296,13 +298,13 @@ Options::parse (int *argc_p,
*argc_p = e;
}
-int
+static int
test_filter_impl()
{
return Bse::Block::test_resampler2 (options.filter_impl_verbose) ? 0 : 1;
}
-double
+static double
gettime ()
{
timeval tv;
@@ -621,7 +623,7 @@ perform_test ()
}
}
-int
+static int
perform_test()
{
switch (test_type)
diff --git a/tests/testresamplerq.cc b/tests/testresamplerq.cc
index 44c1c41..47e786e 100644
--- a/tests/testresamplerq.cc
+++ b/tests/testresamplerq.cc
@@ -9,6 +9,9 @@
#include <sfi/sfi.hh>
#include <stdlib.h>
#include <stdio.h>
+
+using namespace Bse;
+
using Bse::Resampler::Resampler2;
using Rapicorn::AlignedArray;
using std::vector;
diff --git a/tests/testwavechunk.cc b/tests/testwavechunk.cc
index 5251b43..8869f79 100644
--- a/tests/testwavechunk.cc
+++ b/tests/testwavechunk.cc
@@ -10,6 +10,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <math.h>
+
+using namespace Bse;
+
enum {
VERBOSITY_NONE,
VERBOSITY_SETUP,
@@ -92,9 +95,9 @@ run_loop_test (GslWaveLoopType loop_type,
}
if (abort)
{
- g_error ("mismatches occoured, setup: loop_type=%u loop_first=%lld loop_last=%lld loop_count=%d
(length=%lld)",
- wchunk->loop_type, wchunk->loop_first, wchunk->loop_last, wchunk->loop_count,
- gsl_data_handle_length (wchunk->dcache->dhandle));
+ Bse::fatal ("mismatches occoured, setup: loop_type=%u loop_first=%lld loop_last=%lld loop_count=%d
(length=%lld)",
+ wchunk->loop_type, wchunk->loop_first, wchunk->loop_last, wchunk->loop_count,
+ gsl_data_handle_length (wchunk->dcache->dhandle));
}
gsl_wave_chunk_unuse_block (wchunk, &block);
block.offset = block.next_offset;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]