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/115_gendata_eoesep/00_all.in | 0 test/115_gendata_eoesep/00_all.out | 9 +++++ test/115_gendata_eoesep/gendata_eoesep_tests.c | 46 ++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 test/115_gendata_eoesep/00_all.in create mode 100644 test/115_gendata_eoesep/00_all.out create mode 100644 test/115_gendata_eoesep/gendata_eoesep_tests.c (limited to 'test/115_gendata_eoesep') diff --git a/test/115_gendata_eoesep/00_all.in b/test/115_gendata_eoesep/00_all.in new file mode 100644 index 0000000..e69de29 diff --git a/test/115_gendata_eoesep/00_all.out b/test/115_gendata_eoesep/00_all.out new file mode 100644 index 0000000..df5195d --- /dev/null +++ b/test/115_gendata_eoesep/00_all.out @@ -0,0 +1,9 @@ +939880 +Classes (ESEP only): 782 +0: 1 +1: 1 +2: 3 +3: 23 +4: 235 +5: 2281 +6: 22069 diff --git a/test/115_gendata_eoesep/gendata_eoesep_tests.c b/test/115_gendata_eoesep/gendata_eoesep_tests.c new file mode 100644 index 0000000..7ed9778 --- /dev/null +++ b/test/115_gendata_eoesep/gendata_eoesep_tests.c @@ -0,0 +1,46 @@ +/* +The test does not generate the full table. For reference, these are the values: + +0: 1 +1: 1 +2: 3 +3: 23 +4: 235 +5: 2281 +6: 22069 +7: 182776 +8: 767847 +9: 617858 +10: 8439 +11: 3 +*/ + +#include "../test.h" + +#define DEPTH 6 +#define EMAX (495*70) +#define CL 782 +#define ISIZE 512 +#define FULLSIZE (ISIZE + (CL*1024) + (4*EMAX)) + +unsigned char buf[FULLSIZE]; + +size_t gendata_eoesep(unsigned char [static FULLSIZE], uint8_t); +int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *); + +void run(void) { + uint32_t i; + size_t result; + tableinfo_t info; + + result = gendata_eoesep(buf, DEPTH); + if (readtableinfo(FULLSIZE, buf, &info) != NISSY_OK) { + printf("Error reading info from table\n"); + return; + } + + printf("%zu\n", result); + printf("Classes (ESEP only): %" PRIu64 "\n", info.classes); + for (i = 0; i <= DEPTH; i++) + printf("%" PRIu32 ": %" PRIu64 "\n", i, info.distribution[i]); +} -- cgit v1.3