aboutsummaryrefslogtreecommitdiff
path: root/test/130_gendata_eo/gendata_eo_tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/130_gendata_eo/gendata_eo_tests.c')
-rw-r--r--test/130_gendata_eo/gendata_eo_tests.c38
1 files changed, 38 insertions, 0 deletions
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 @@
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
18unsigned char buf[FULLSIZE];
19
20long long gendata_coord_dispatch(
21 const char *, unsigned long long, unsigned char *);
22int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *);
23
24void run(void) {
25 uint32_t i;
26 size_t result;
27 tableinfo_t info;
28
29 result = gendata_coord_dispatch("coord_EO_FB", FULLSIZE, buf);
30 if (readtableinfo(FULLSIZE, buf, &info) != NISSY_OK) {
31 printf("Error reading info from table\n");
32 return;
33 }
34
35 printf("%zu\n", result);
36 for (i = 0; i <= 10; i++)
37 printf("%" PRIu32 ": %" PRIu64 "\n", i, info.distribution[i]);
38}

Generated with cgit - Back to sebastiano.tronto.net