From 270e5b0444f67781856bf80db51650af9cb89b0c Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 17 Jul 2025 08:54:44 +0200 Subject: Renamed tests to make space for more coordinate tests --- test/130_gendata_eo/00_all.in | 0 test/130_gendata_eo/00_all.out | 12 +++++++++++ test/130_gendata_eo/gendata_eo_tests.c | 38 ++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 test/130_gendata_eo/00_all.in create mode 100644 test/130_gendata_eo/00_all.out create mode 100644 test/130_gendata_eo/gendata_eo_tests.c (limited to 'test/130_gendata_eo') diff --git a/test/130_gendata_eo/00_all.in b/test/130_gendata_eo/00_all.in new file mode 100644 index 0000000..e69de29 diff --git a/test/130_gendata_eo/00_all.out b/test/130_gendata_eo/00_all.out new file mode 100644 index 0000000..42e8c66 --- /dev/null +++ b/test/130_gendata_eo/00_all.out @@ -0,0 +1,12 @@ +1536 +0: 1 +1: 2 +2: 25 +3: 202 +4: 620 +5: 900 +6: 285 +7: 13 +8: 0 +9: 0 +10: 0 diff --git a/test/130_gendata_eo/gendata_eo_tests.c b/test/130_gendata_eo/gendata_eo_tests.c new file mode 100644 index 0000000..1b985c3 --- /dev/null +++ b/test/130_gendata_eo/gendata_eo_tests.c @@ -0,0 +1,38 @@ +/* +Pruning table values (from nissy): +0: 1 +1: 2 +2: 25 +3: 202 +4: 620 +5: 900 +6: 285 +7: 13 +*/ + +#include "../test.h" + +#define ISIZE 512 +#define FULLSIZE (ISIZE + 1024) + +unsigned char buf[FULLSIZE]; + +long long gendata_coord_dispatch( + const char *, unsigned long long, unsigned char *); +int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *); + +void run(void) { + uint32_t i; + size_t result; + tableinfo_t info; + + result = gendata_coord_dispatch("coord_EO_FB", FULLSIZE, buf); + if (readtableinfo(FULLSIZE, buf, &info) != NISSY_OK) { + printf("Error reading info from table\n"); + return; + } + + printf("%zu\n", result); + for (i = 0; i <= 10; i++) + printf("%" PRIu32 ": %" PRIu64 "\n", i, info.distribution[i]); +} -- cgit v1.3