ref: eba0cc4f03e5cc19050f6ca7602613a9bc3b03b9
parent: 1b3edc67772a3d8e26013a2184bcbf67476a85a4
author: Paul Brossier <piem@piem.org>
date: Thu Nov 29 11:15:21 EST 2018
[tests] simplify awhitening parsing
--- a/tests/src/spectral/test-awhitening.c
+++ b/tests/src/spectral/test-awhitening.c
@@ -10,12 +10,7 @@
if (argc < 3) {
err = 2;
PRINT_WRN("no arguments, running tests\n");
- if (test_wrong_params() != 0) {
- PRINT_ERR("tests failed!\n");
- err = 1;
- } else {
- err = 0;
- }
+ err = test_wrong_params();
PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]);
return err;
}
@@ -30,11 +25,6 @@
if ( argc >= 4 ) samplerate = atoi(argv[3]);
if ( argc >= 5 ) hop_size = atoi(argv[4]);
- if ( argc >= 6 ) {
- err = 2;
- PRINT_ERR("too many arguments\n");
- return err;
- }
fvec_t *vec = new_fvec(hop_size);
fvec_t *out = new_fvec(hop_size); // output buffer