diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-10 19:43:05 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-10 19:43:05 +0200 |
| commit | 70d3a3de3a2fdef7e47b2bd510261d69390a3a9c (patch) | |
| tree | 2c545953d0b61b37c4f281cd47981e9350b5c09b /test/090_tables_readwrite | |
| parent | 1f4900a3cc6ca74f94b73e224d14a09d52c4549c (diff) | |
| download | nissy-core-70d3a3de3a2fdef7e47b2bd510261d69390a3a9c.tar.gz nissy-core-70d3a3de3a2fdef7e47b2bd510261d69390a3a9c.zip | |
New tableinfo for gendata_h48, still work to do
Diffstat (limited to 'test/090_tables_readwrite')
| -rw-r--r-- | test/090_tables_readwrite/00_table.in | 1 | ||||
| -rw-r--r-- | test/090_tables_readwrite/00_table.out | 1 | ||||
| -rw-r--r-- | test/090_tables_readwrite/tables_readwrite_tests.c | 5 |
3 files changed, 6 insertions, 1 deletions
diff --git a/test/090_tables_readwrite/00_table.in b/test/090_tables_readwrite/00_table.in index f286968..579736a 100644 --- a/test/090_tables_readwrite/00_table.in +++ b/test/090_tables_readwrite/00_table.in | |||
| @@ -5,6 +5,7 @@ Test solver | |||
| 5 | 100000000000 | 5 | 100000000000 |
| 6 | 12345678912345 | 6 | 12345678912345 |
| 7 | 399999999998 | 7 | 399999999998 |
| 8 | 3393 | ||
| 8 | 2 | 9 | 2 |
| 9 | 0 | 10 | 0 |
| 10 | 20 | 11 | 20 |
diff --git a/test/090_tables_readwrite/00_table.out b/test/090_tables_readwrite/00_table.out index f286968..579736a 100644 --- a/test/090_tables_readwrite/00_table.out +++ b/test/090_tables_readwrite/00_table.out | |||
| @@ -5,6 +5,7 @@ Test solver | |||
| 5 | 100000000000 | 5 | 100000000000 |
| 6 | 12345678912345 | 6 | 12345678912345 |
| 7 | 399999999998 | 7 | 399999999998 |
| 8 | 3393 | ||
| 8 | 2 | 9 | 2 |
| 9 | 0 | 10 | 0 |
| 10 | 20 | 11 | 20 |
diff --git a/test/090_tables_readwrite/tables_readwrite_tests.c b/test/090_tables_readwrite/tables_readwrite_tests.c index f3162ea..32d171a 100644 --- a/test/090_tables_readwrite/tables_readwrite_tests.c +++ b/test/090_tables_readwrite/tables_readwrite_tests.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #include "../test.h" | 1 | #include "../test.h" |
| 2 | 2 | ||
| 3 | #define INFOSIZE 512 | 3 | #define INFOSIZE 512 |
| 4 | #define INFO_SOLVER_STRLEN 20 | 4 | #define INFO_SOLVER_STRLEN 100 |
| 5 | #define INFO_DISTRIBUTION_LEN 21 | 5 | #define INFO_DISTRIBUTION_LEN 21 |
| 6 | 6 | ||
| 7 | typedef struct { | 7 | typedef struct { |
| @@ -11,6 +11,7 @@ typedef struct { | |||
| 11 | uint64_t fullsize; | 11 | uint64_t fullsize; |
| 12 | uint64_t hash; | 12 | uint64_t hash; |
| 13 | uint64_t entries; | 13 | uint64_t entries; |
| 14 | uint64_t classes; | ||
| 14 | uint8_t bits; | 15 | uint8_t bits; |
| 15 | uint8_t base; | 16 | uint8_t base; |
| 16 | uint8_t maxvalue; | 17 | uint8_t maxvalue; |
| @@ -45,6 +46,7 @@ tableinfo_t test_readinfo(void) { | |||
| 45 | ret.fullsize = readn(); | 46 | ret.fullsize = readn(); |
| 46 | ret.hash = readn(); | 47 | ret.hash = readn(); |
| 47 | ret.entries = readn(); | 48 | ret.entries = readn(); |
| 49 | ret.classes = readn(); | ||
| 48 | ret.bits = (uint8_t)readn(); | 50 | ret.bits = (uint8_t)readn(); |
| 49 | ret.base = (uint8_t)readn(); | 51 | ret.base = (uint8_t)readn(); |
| 50 | ret.maxvalue = (uint8_t)readn(); | 52 | ret.maxvalue = (uint8_t)readn(); |
| @@ -69,6 +71,7 @@ void test_writeinfo(tableinfo_t info) { | |||
| 69 | printf("%" PRIu64 "\n", info.fullsize); | 71 | printf("%" PRIu64 "\n", info.fullsize); |
| 70 | printf("%" PRIu64 "\n", info.hash); | 72 | printf("%" PRIu64 "\n", info.hash); |
| 71 | printf("%" PRIu64 "\n", info.entries); | 73 | printf("%" PRIu64 "\n", info.entries); |
| 74 | printf("%" PRIu64 "\n", info.classes); | ||
| 72 | printf("%" PRIu8 "\n", info.bits); | 75 | printf("%" PRIu8 "\n", info.bits); |
| 73 | printf("%" PRIu8 "\n", info.base); | 76 | printf("%" PRIu8 "\n", info.base); |
| 74 | printf("%" PRIu8 "\n", info.maxvalue); | 77 | printf("%" PRIu8 "\n", info.maxvalue); |
