From 6200052165d1103fd2a00e50058ff9fc68cccd10 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Dec 2018 16:26:00 +0100 Subject: [PATCH] [tests] try reading after close in test-source.c --- tests/src/io/base-source_custom.h | 8 ++++++++ tests/src/io/test-source.c | 8 ++++++++ 2 files changed, 16 insertions(+) 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); -- 2.11.0