diff options
Diffstat (limited to 'test/psychological_line.c')
| -rw-r--r-- | test/psychological_line.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/psychological_line.c b/test/psychological_line.c new file mode 100644 index 0000000..711923c --- /dev/null +++ b/test/psychological_line.c @@ -0,0 +1,23 @@ +#include <stddef.h> +#include "ts.h" + +bool ts_test_psychological_line( void ) +{ + fp_t const x0[] = { 10, 10, 20, 20, 30 }; + fp_t const x1[] = { 12, 11, 22, 19, 32 }; + fp_t const x2[] = { 9, 9, 19, 18, 29 }; + fp_t const x3[] = { 11, 10, 21, 20, 31 }; + + uint_t const k = 2; + + fp_t e[4]; + e[0] = 50; + e[1] = 50; + e[2] = 50; + e[3] = 50; + + fp_t const * const x[] = { x0, x1, x2, x3 }; + fp_t const * const exp[1] = { e }; + + return ts_test(ts_psychological_line, ts_psychological_line_offset, x, exp, 5, (ts_constant_t *)&k, &ts_psychological_line_p); +} |