aboutsummaryrefslogtreecommitdiff
path: root/test/120_gendata_eo
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-03-04 08:24:39 +0100
committerSebastiano Tronto <sebastiano@tronto.net>2025-03-04 08:24:39 +0100
commit7defd8041e6050a9adf7927b43fd249d75d6389f (patch)
tree345675fbdbb94a8027e35556d3a116a48f486dd8 /test/120_gendata_eo
parent038469b6f27106ab2002c7da11c6bca2a5fe30ee (diff)
downloadnissy-core-7defd8041e6050a9adf7927b43fd249d75d6389f.tar.gz
nissy-core-7defd8041e6050a9adf7927b43fd249d75d6389f.zip
Begin work for coordinate solver
Diffstat (limited to 'test/120_gendata_eo')
-rw-r--r--test/120_gendata_eo/00_all.in0
-rw-r--r--test/120_gendata_eo/00_all.out12
-rw-r--r--test/120_gendata_eo/gendata_eo_tests.c37
3 files changed, 49 insertions, 0 deletions
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
--- /dev/null
+++ b/test/120_gendata_eo/00_all.in
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 @@
11536
20: 1
31: 2
42: 25
53: 202
64: 620
75: 900
86: 285
97: 13
108: 0
119: 0
1210: 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 @@
1/*
2Pruning table values (from nissy):
30: 1
41: 2
52: 25
63: 202
74: 620
85: 900
96: 285
107: 13
11*/
12
13#include "../test.h"
14
15#define ISIZE 512
16#define FULLSIZE (ISIZE + 1024)
17
18char buf[FULLSIZE];
19
20size_t gendata_coordinate_name(const char *, void *);
21bool readtableinfo(uint64_t, const char *, tableinfo_t *);
22
23void run(void) {
24 uint32_t i;
25 size_t result;
26 tableinfo_t info;
27
28 result = gendata_coordinate_name("EO", buf);
29 if (readtableinfo(FULLSIZE, buf, &info) != NISSY_OK) {
30 printf("Error reading info from table\n");
31 return;
32 }
33
34 printf("%zu\n", result);
35 for (i = 0; i <= 10; i++)
36 printf("%" PRIu32 ": %" PRIu64 "\n", i, info.distribution[i]);
37}

Generated with cgit - Back to sebastiano.tronto.net