ref: 776d65bfad94b7e63a00f5cd98110af45117810b
parent: 1f382d6bfb43a386b21dba4132fc16f4cf0ad993
author: Paul Brossier <piem@piem.org>
date: Fri Dec 21 09:16:29 EST 2018
[tests] test-mathutils-window input validation
--- a/tests/src/test-mathutils-window.c
+++ b/tests/src/test-mathutils-window.c
@@ -7,8 +7,8 @@
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 @@
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;
}