src/io/source_sndfile.c: fix resampled position in _seek, improve test for non intege...
[aubio.git] / tests / src / io / test-source_seek.c
index ad8d177..b42c86c 100644 (file)
@@ -84,7 +84,9 @@ int main (int argc, char **argv)
 beach:
   del_fvec (vec);
 
+  // check that we got exactly the same number of frames
   assert ( old_n_frames_2 == old_n_frames_1 );
-  assert ( old_n_frames_3 == (uint_t)floor(old_n_frames_1 / 2. + .5) );
+  // check that we got about half the frames, with 3 decimals
+  assert ( roundf(1.e3 * old_n_frames_1 / old_n_frames_3) / 1.e3 == 2.);
   return err;
 }