diff options
Diffstat (limited to 'test/minmax.c')
| -rw-r--r-- | test/minmax.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/minmax.c b/test/minmax.c new file mode 100644 index 0000000..64ba78b --- /dev/null +++ b/test/minmax.c @@ -0,0 +1,17 @@ +#include <math.h> +#include <stddef.h> +#include "ts.h" + +bool ts_test_minmax( void ) +{ + uint_t k = 3; + + fp_t const x[] = { 1, 3, 2, 5, 4, 1, 6, 3, 2, 4 }; + fp_t const emin[] = { 1, 2, 2, 1, 1, 1, 2, 2 }; + fp_t const emax[] = { 3, 5, 5, 5, 6, 6, 6, 4 }; + + fp_t const * const inp[1] = { x }; + fp_t const * const exp[2] = { emin, emax }; + + return ts_test(ts_minmax, ts_minmax_offset, inp, exp, sizeof( x ) / sizeof( *x ), (ts_constant_t *)&k, &ts_minmax_p); +} |