From: Paul Brossier Date: Fri, 21 Dec 2018 15:26:00 +0000 (+0100) Subject: [tests] try reading after close in test-source.c X-Git-Tag: 0.4.9~31 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=6200052165d1103fd2a00e50058ff9fc68cccd10 [tests] try reading after close in test-source.c --- diff --git a/tests/src/io/base-source_custom.h b/tests/src/io/base-source_custom.h index f530026c..95540cf5 100644 --- a/tests/src/io/base-source_custom.h +++ b/tests/src/io/base-source_custom.h @@ -141,6 +141,14 @@ int test_wrong_params(void) // test closing the file a second time aubio_source_custom_close(s); + // reading after close fails + del_fvec(vec); + vec = new_fvec(hop_size); + aubio_source_custom_do(s, vec, &read); + del_fmat(mat); + mat = new_fmat(channels, hop_size); + aubio_source_custom_do_multi(s, mat, &read); + del_aubio_source_custom(s); del_fmat(mat); del_fvec(vec); diff --git a/tests/src/io/test-source.c b/tests/src/io/test-source.c index 8b69f685..d4f628ec 100644 --- a/tests/src/io/test-source.c +++ b/tests/src/io/test-source.c @@ -137,6 +137,14 @@ int test_wrong_params(void) // test closing the file a second time aubio_source_close(s); + // reading after close fails + del_fvec(vec); + vec = new_fvec(hop_size); + aubio_source_do(s, vec, &read); + del_fmat(mat); + mat = new_fmat(channels, hop_size); + aubio_source_do_multi(s, mat, &read); + del_aubio_source(s); del_fmat(mat); del_fvec(vec);