From: Paul Brossier Date: Thu, 29 Nov 2018 17:49:32 +0000 (+0100) Subject: [tests] onset creation may succeed with non-power of two sizes X-Git-Tag: 0.4.9~139^2 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=2cf905ffab87a4fc1b85b1d6b301a5142a471531;p=aubio.git [tests] onset creation may succeed with non-power of two sizes --- diff --git a/tests/src/onset/test-onset.c b/tests/src/onset/test-onset.c index 93151f4e..71936447 100644 --- a/tests/src/onset/test-onset.c +++ b/tests/src/onset/test-onset.c @@ -84,11 +84,13 @@ int test_wrong_params(void) // specdesc creation failed if (new_aubio_onset("abcd", win_size, win_size/2, samplerate)) return 1; - // pv creation failed - if (new_aubio_onset("default", 5, 2, samplerate)) - return 1; aubio_onset_t *o; + + // pv creation might fail + o = new_aubio_onset("default", 5, 2, samplerate); + if (o) del_aubio_onset(o); + o = new_aubio_onset("default", win_size, hop_size, samplerate); if (!aubio_onset_set_default_parameters(o, "wrong_type")) return 1;