gendata_eo_tests.c (645B)
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 char buf[FULLSIZE]; 19 20 size_t gendata_coord_dispatch(const char *, void *); 21 bool readtableinfo(uint64_t, const char *, tableinfo_t *); 22 23 void run(void) { 24 uint32_t i; 25 size_t result; 26 tableinfo_t info; 27 28 result = gendata_coord_dispatch("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 }