From 776d65bfad94b7e63a00f5cd98110af45117810b Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Dec 2018 14:16:29 +0100 Subject: [PATCH] [tests] test-mathutils-window input validation --- tests/src/test-mathutils-window.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/src/test-mathutils-window.c b/tests/src/test-mathutils-window.c index 4b45e7f1..a75bb5a0 100644 --- a/tests/src/test-mathutils-window.c +++ b/tests/src/test-mathutils-window.c @@ -7,8 +7,8 @@ int main (void) uint_t n_length = 4, n_types = 10, i, t; uint_t lengths[4] = { 8, 10, 15, 16 }; char *method = "default"; - char *window_types[10] = { "default", - "rectangle", "hamming", "hanning", "hanningz", + char *window_types[11] = { "default", + "ones", "rectangle", "hamming", "hanning", "hanningz", "blackman", "blackman_harris", "gaussian", "welch", "parzen"}; for ( t = 0; t < n_types; t ++ ) { @@ -26,6 +26,10 @@ int main (void) del_fvec(window); } } + + assert (new_aubio_window("parzen", -1) == NULL); + assert (new_aubio_window(NULL, length) == NULL); + assert (new_aubio_window("\0", length) == NULL); return 0; } -- 2.11.0