shithub: aubio

Download patch

ref: 6200052165d1103fd2a00e50058ff9fc68cccd10
parent: 87971384c0c84945758c285001a5bd21bae2c171
author: Paul Brossier <piem@piem.org>
date: Fri Dec 21 11:26:00 EST 2018

[tests] try reading after close in test-source.c

--- a/tests/src/io/base-source_custom.h
+++ b/tests/src/io/base-source_custom.h
@@ -141,6 +141,14 @@
   // 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);
--- a/tests/src/io/test-source.c
+++ b/tests/src/io/test-source.c
@@ -137,6 +137,14 @@
   // 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);