From 3286230f7713da2ad076b8a8e1106e0f3ab79790 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 22 Mar 2013 19:07:51 -0500 Subject: [PATCH] tests/src/io/test-source_seek.c: add simple test, read() / seek(0) / read() --- tests/src/io/test-source_seek.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/src/io/test-source_seek.c b/tests/src/io/test-source_seek.c index a5f041c2..bb5cd827 100644 --- a/tests/src/io/test-source_seek.c +++ b/tests/src/io/test-source_seek.c @@ -22,6 +22,7 @@ int main (int argc, char **argv) uint_t samplerate = 0; uint_t hop_size = 256; uint_t n_frames = 0, read = 0; + uint_t old_n_frames; if ( argc == 3 ) samplerate = atoi(argv[2]); if ( argc == 4 ) hop_size = atoi(argv[3]); @@ -45,6 +46,8 @@ int main (int argc, char **argv) aubio_source_seek (s, 0); + old_n_frames = n_frames; + n_frames = 0; do { aubio_source_do(s, vec, &read); @@ -59,5 +62,6 @@ int main (int argc, char **argv) beach: del_fvec (vec); + assert ( n_frames == old_n_frames ); return err; } -- 2.26.2