diff options
| author | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
|---|---|---|
| committer | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
| commit | 3d92926a902017e7cf1f5738e99ff62da596ce12 (patch) | |
| tree | 2b55422c26a48759d56fa91f06df24449e9dfa88 /test/gen_test_data.c | |
| parent | 07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff) | |
refactormain
Diffstat (limited to 'test/gen_test_data.c')
| -rw-r--r-- | test/gen_test_data.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/gen_test_data.c b/test/gen_test_data.c index 6ef54af..30bb7ff 100644 --- a/test/gen_test_data.c +++ b/test/gen_test_data.c @@ -1,6 +1,7 @@ /* gen_test_data.c - Validate all ts functions run without error. * Note: excluded from default build. Fix and add target to use. */ +#define _POSIX_C_SOURCE 200809L #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -41,7 +42,11 @@ int main(void) { size_t nsamples = sizeof(samples) / sizeof(samples[0]); for (size_t fi = 0; fi < nsamples; fi++) { - typeof(samples[fi]) f = samples[fi]; + struct { + const char *name; + int (*func)(fp_t * const y[], fp_t const * const x[], uint_t, ts_constant_t const *); + uint_t x_n, y_n; + } f = samples[fi]; /* Allocate input arrays */ fp_t **x = calloc(f.x_n, sizeof(fp_t *)); |