From: Paul Brossier Date: Sat, 23 Mar 2013 00:07:51 +0000 (-0500) Subject: tests/src/io/test-source_seek.c: add simple test, read() / seek(0) / read() X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3286230f7713da2ad076b8a8e1106e0f3ab79790;p=aubio.git tests/src/io/test-source_seek.c: add simple test, read() / seek(0) / read() --- 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; }