From 2cf905ffab87a4fc1b85b1d6b301a5142a471531 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 29 Nov 2018 18:49:32 +0100 Subject: [PATCH 1/1] [tests] onset creation may succeed with non-power of two sizes --- tests/src/onset/test-onset.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.11.0