[tests] fail dct tests if reconstruction failed
authorPaul Brossier <piem@piem.org>
Thu, 29 Nov 2018 15:58:12 +0000 (16:58 +0100)
committerPaul Brossier <piem@piem.org>
Thu, 29 Nov 2018 15:58:12 +0000 (16:58 +0100)
tests/src/spectral/test-dct.c

index 8e388ef..3ea3109 100644 (file)
@@ -32,9 +32,7 @@ int main (void)
     aubio_dct_do (dct, in, dctout);
     aubio_dct_rdo (dct, dctout, out);
     for (j = 0; j < in->length; j++) {
-      if (fabsf(in->data[j] - out->data[j]) > 10.e-4) {
-        fprintf(stderr, "dct reconstruction failed\n");
-      }
+      return_code += (fabsf(in->data[j] - out->data[j]) > 10.e-4);
     }
   }