projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b610be5
)
[tests] use run_on_default_source in all source tests
author
Paul Brossier
<piem@piem.org>
Thu, 29 Nov 2018 15:11:15 +0000
(16:11 +0100)
committer
Paul Brossier
<piem@piem.org>
Thu, 29 Nov 2018 15:11:15 +0000
(16:11 +0100)
tests/src/io/test-source_apple_audio.c
patch
|
blob
|
history
tests/src/io/test-source_avcodec.c
patch
|
blob
|
history
tests/src/io/test-source_multi.c
patch
|
blob
|
history
tests/src/io/test-source_seek.c
patch
|
blob
|
history
tests/src/io/test-source_sndfile.c
patch
|
blob
|
history
tests/src/io/test-source_wavread.c
patch
|
blob
|
history
diff --git
a/tests/src/io/test-source_apple_audio.c
b/tests/src/io/test-source_apple_audio.c
index
92d0e54
..
373d30a
100644
(file)
--- a/
tests/src/io/test-source_apple_audio.c
+++ b/
tests/src/io/test-source_apple_audio.c
@@
-9,8
+9,8
@@
int main (int argc, char **argv)
{
uint_t err = 0;
if (argc < 2) {
{
uint_t err = 0;
if (argc < 2) {
-
err = 2
;
-
PRINT_ERR("not enough arguments\n"
);
+
PRINT_ERR("not enough arguments, running tests\n")
;
+
err = run_on_default_source(main
);
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
@@
-56,7
+56,7
@@
int main (int argc, char **argv)
del_aubio_source_apple_audio (s);
beach:
#else /* HAVE_SOURCE_APPLE_AUDIO */
del_aubio_source_apple_audio (s);
beach:
#else /* HAVE_SOURCE_APPLE_AUDIO */
- err =
3
;
+ err =
0
;
PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n");
#endif /* HAVE_SOURCE_APPLE_AUDIO */
return err;
PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n");
#endif /* HAVE_SOURCE_APPLE_AUDIO */
return err;
diff --git
a/tests/src/io/test-source_avcodec.c
b/tests/src/io/test-source_avcodec.c
index
dc23d76
..
00524bf
100644
(file)
--- a/
tests/src/io/test-source_avcodec.c
+++ b/
tests/src/io/test-source_avcodec.c
@@
-9,8
+9,8
@@
int main (int argc, char **argv)
{
uint_t err = 0;
if (argc < 2) {
{
uint_t err = 0;
if (argc < 2) {
-
err = 2
;
-
PRINT_ERR("not enough arguments\n"
);
+
PRINT_ERR("not enough arguments, running tests\n")
;
+
err = run_on_default_source(main
);
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
@@
-56,7
+56,7
@@
int main (int argc, char **argv)
del_aubio_source_avcodec (s);
beach:
#else /* HAVE_LIBAV */
del_aubio_source_avcodec (s);
beach:
#else /* HAVE_LIBAV */
- err =
3
;
+ err =
0
;
PRINT_ERR("aubio was not compiled with aubio_source_avcodec\n");
#endif /* HAVE_LIBAV */
return err;
PRINT_ERR("aubio was not compiled with aubio_source_avcodec\n");
#endif /* HAVE_LIBAV */
return err;
diff --git
a/tests/src/io/test-source_multi.c
b/tests/src/io/test-source_multi.c
index
b3b4683
..
69d8816
100644
(file)
--- a/
tests/src/io/test-source_multi.c
+++ b/
tests/src/io/test-source_multi.c
@@
-5,8
+5,8
@@
int main (int argc, char **argv)
{
sint_t err = 0;
if (argc < 2) {
{
sint_t err = 0;
if (argc < 2) {
-
err = -2
;
-
PRINT_ERR("not enough arguments\n"
);
+
PRINT_ERR("not enough arguments, running tests\n")
;
+
err = run_on_default_source(main
);
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
diff --git
a/tests/src/io/test-source_seek.c
b/tests/src/io/test-source_seek.c
index
773aefe
..
07eeb8d
100644
(file)
--- a/
tests/src/io/test-source_seek.c
+++ b/
tests/src/io/test-source_seek.c
@@
-5,8
+5,8
@@
int main (int argc, char **argv)
{
uint_t err = 0;
if (argc < 2) {
{
uint_t err = 0;
if (argc < 2) {
-
err = 2
;
-
PRINT_ERR("not enough arguments\n"
);
+
PRINT_ERR("not enough arguments, running tests\n")
;
+
err = run_on_default_source(main
);
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
diff --git
a/tests/src/io/test-source_sndfile.c
b/tests/src/io/test-source_sndfile.c
index
6dfff59
..
5afb937
100644
(file)
--- a/
tests/src/io/test-source_sndfile.c
+++ b/
tests/src/io/test-source_sndfile.c
@@
-9,8
+9,8
@@
int main (int argc, char **argv)
{
uint_t err = 0;
if (argc < 2) {
{
uint_t err = 0;
if (argc < 2) {
-
err = 2
;
-
PRINT_ERR("not enough arguments\n"
);
+
PRINT_ERR("not enough arguments, running tests\n")
;
+
err = run_on_default_source(main
);
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
@@
-56,7
+56,7
@@
int main (int argc, char **argv)
del_aubio_source_sndfile (s);
beach:
#else
del_aubio_source_sndfile (s);
beach:
#else
- err =
3
;
+ err =
0
;
PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n");
#endif /* HAVE_SNDFILE */
return err;
PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n");
#endif /* HAVE_SNDFILE */
return err;
diff --git
a/tests/src/io/test-source_wavread.c
b/tests/src/io/test-source_wavread.c
index
23511ca
..
4f1f35f
100644
(file)
--- a/
tests/src/io/test-source_wavread.c
+++ b/
tests/src/io/test-source_wavread.c
@@
-9,8
+9,8
@@
int main (int argc, char **argv)
{
uint_t err = 0;
if (argc < 2) {
{
uint_t err = 0;
if (argc < 2) {
-
err = 2
;
-
PRINT_ERR("not enough arguments\n"
);
+
PRINT_ERR("not enough arguments, running tests\n")
;
+
err = run_on_default_source(main
);
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
PRINT_MSG("read a wave file as a mono vector\n");
PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]);
PRINT_MSG("examples:\n");
@@
-35,7
+35,6
@@
int main (int argc, char **argv)
aubio_source_wavread_t * s =
new_aubio_source_wavread(source_path, samplerate, hop_size);
aubio_source_wavread_t * s =
new_aubio_source_wavread(source_path, samplerate, hop_size);
-
if (!s) { err = 1; goto beach; }
fvec_t *vec = new_fvec(hop_size);
if (!s) { err = 1; goto beach; }
fvec_t *vec = new_fvec(hop_size);
@@
-57,7
+56,7
@@
int main (int argc, char **argv)
del_aubio_source_wavread (s);
beach:
#else
del_aubio_source_wavread (s);
beach:
#else
- err =
3
;
+ err =
0
;
PRINT_ERR("aubio was not compiled with aubio_source_wavread\n");
#endif /* HAVE_WAVREAD */
return err;
PRINT_ERR("aubio was not compiled with aubio_source_wavread\n");
#endif /* HAVE_WAVREAD */
return err;