aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-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
-rw-r--r--test/test.h1
4 files changed, 50 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}
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 @@
14#include "../src/solvers/h48/coordinate_macros.h" 14#include "../src/solvers/h48/coordinate_macros.h"
15#include "../src/solvers/h48/map_types_macros.h" 15#include "../src/solvers/h48/map_types_macros.h"
16#include "../src/solvers/h48/gendata_types_macros.h" 16#include "../src/solvers/h48/gendata_types_macros.h"
17#include "../src/solvers/coord/coord_types_macros.h"
17 18
18#define STRLENMAX 10000 19#define STRLENMAX 10000
19 20

Generated with cgit - Back to sebastiano.tronto.net