summaryrefslogtreecommitdiffstats
path: root/test/cumulative_sum.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/cumulative_sum.c')
-rw-r--r--test/cumulative_sum.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/cumulative_sum.c b/test/cumulative_sum.c
new file mode 100644
index 0000000..828ef20
--- /dev/null
+++ b/test/cumulative_sum.c
@@ -0,0 +1,13 @@
+#include <stddef.h>
+#include "ts.h"
+
+bool ts_test_cumulative_sum( void )
+{
+ fp_t const x0[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
+ fp_t const e0[] = { 1, 3, 6, 10, 15, 21, 28, 36 };
+
+ fp_t const * const x[] = { x0 };
+ fp_t const * const e[1] = { e0 };
+
+ return ts_test(ts_cumulative_sum, ts_cumulative_sum_offset, x, e, sizeof( x0 ) / sizeof( *x0 ), (ts_constant_t *)NULL, &ts_cumulative_sum_p);
+}