diff options
Diffstat (limited to 'test/130_gendata_eo/gendata_eo_tests.c')
| -rw-r--r-- | test/130_gendata_eo/gendata_eo_tests.c | 38 |
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 | /* | ||
| 2 | Pruning table values (from nissy): | ||
| 3 | 0: 1 | ||
| 4 | 1: 2 | ||
| 5 | 2: 25 | ||
| 6 | 3: 202 | ||
| 7 | 4: 620 | ||
| 8 | 5: 900 | ||
| 9 | 6: 285 | ||
| 10 | 7: 13 | ||
| 11 | */ | ||
| 12 | |||
| 13 | #include "../test.h" | ||
| 14 | |||
| 15 | #define ISIZE 512 | ||
| 16 | #define FULLSIZE (ISIZE + 1024) | ||
| 17 | |||
| 18 | unsigned char buf[FULLSIZE]; | ||
| 19 | |||
| 20 | long long gendata_coord_dispatch( | ||
| 21 | const char *, unsigned long long, unsigned char *); | ||
| 22 | int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *); | ||
| 23 | |||
| 24 | void 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 | } | ||
