From 7defd8041e6050a9adf7927b43fd249d75d6389f Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Tue, 4 Mar 2025 08:24:39 +0100 Subject: Begin work for coordinate solver --- test/120_gendata_eo/00_all.in | 0 test/120_gendata_eo/00_all.out | 12 +++++++++++ test/120_gendata_eo/gendata_eo_tests.c | 37 ++++++++++++++++++++++++++++++++++ test/test.h | 1 + 4 files changed, 50 insertions(+) create mode 100644 test/120_gendata_eo/00_all.in create mode 100644 test/120_gendata_eo/00_all.out create mode 100644 test/120_gendata_eo/gendata_eo_tests.c (limited to 'test') diff --git a/test/120_gendata_eo/00_all.in b/test/120_gendata_eo/00_all.in new file mode 100644 index 0000000..e69de29 diff --git a/test/120_gendata_eo/00_all.out b/test/120_gendata_eo/00_all.out new file mode 100644 index 0000000..42e8c66 --- /dev/null +++ b/test/120_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/120_gendata_eo/gendata_eo_tests.c b/test/120_gendata_eo/gendata_eo_tests.c new file mode 100644 index 0000000..3a6ac07 --- /dev/null +++ b/test/120_gendata_eo/gendata_eo_tests.c @@ -0,0 +1,37 @@ +/* +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) + +char buf[FULLSIZE]; + +size_t gendata_coordinate_name(const char *, void *); +bool readtableinfo(uint64_t, const char *, tableinfo_t *); + +void run(void) { + uint32_t i; + size_t result; + tableinfo_t info; + + result = gendata_coordinate_name("EO", 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]); +} diff --git a/test/test.h b/test/test.h index fe362c7..e144527 100644 --- a/test/test.h +++ b/test/test.h @@ -14,6 +14,7 @@ #include "../src/solvers/h48/coordinate_macros.h" #include "../src/solvers/h48/map_types_macros.h" #include "../src/solvers/h48/gendata_types_macros.h" +#include "../src/solvers/coord/coord_types_macros.h" #define STRLENMAX 10000 -- cgit v1.3