diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-10 09:58:17 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-09-10 09:58:17 +0200 |
| commit | 3c8f8c2e60cd089679cf5da5160baaf35977b220 (patch) | |
| tree | 8b49c64260e33c714ccacc2e3a1b27582bdfe4a7 /test | |
| parent | 16cf844396181e743403b046c06a21f1dca39426 (diff) | |
| download | nissy-core-3c8f8c2e60cd089679cf5da5160baaf35977b220.tar.gz nissy-core-3c8f8c2e60cd089679cf5da5160baaf35977b220.zip | |
Added next table offset to tableinfo
Diffstat (limited to '')
| -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 | 3 |
3 files changed, 5 insertions, 0 deletions
diff --git a/test/090_tables_readwrite/00_table.in b/test/090_tables_readwrite/00_table.in index 1816242..a35f13a 100644 --- a/test/090_tables_readwrite/00_table.in +++ b/test/090_tables_readwrite/00_table.in | |||
| @@ -7,6 +7,7 @@ Test solver | |||
| 7 | 2 | 7 | 2 |
| 8 | 0 | 8 | 0 |
| 9 | 20 | 9 | 20 |
| 10 | 100000000512 | ||
| 10 | 11 | ||
| 11 | 100 | 12 | 100 |
| 12 | 101 | 13 | 101 |
diff --git a/test/090_tables_readwrite/00_table.out b/test/090_tables_readwrite/00_table.out index 1816242..a35f13a 100644 --- a/test/090_tables_readwrite/00_table.out +++ b/test/090_tables_readwrite/00_table.out | |||
| @@ -7,6 +7,7 @@ Test solver | |||
| 7 | 2 | 7 | 2 |
| 8 | 0 | 8 | 0 |
| 9 | 20 | 9 | 20 |
| 10 | 100000000512 | ||
| 10 | 11 | ||
| 11 | 100 | 12 | 100 |
| 12 | 101 | 13 | 101 |
diff --git a/test/090_tables_readwrite/tables_readwrite_tests.c b/test/090_tables_readwrite/tables_readwrite_tests.c index 97b8ab7..b062460 100644 --- a/test/090_tables_readwrite/tables_readwrite_tests.c +++ b/test/090_tables_readwrite/tables_readwrite_tests.c | |||
| @@ -13,6 +13,7 @@ typedef struct { | |||
| 13 | uint8_t bits; | 13 | uint8_t bits; |
| 14 | uint8_t base; | 14 | uint8_t base; |
| 15 | uint8_t maxvalue; | 15 | uint8_t maxvalue; |
| 16 | uint64_t next; | ||
| 16 | uint64_t distribution[INFO_DISTRIBUTION_LEN]; | 17 | uint64_t distribution[INFO_DISTRIBUTION_LEN]; |
| 17 | } tableinfo_t; | 18 | } tableinfo_t; |
| 18 | 19 | ||
| @@ -45,6 +46,7 @@ tableinfo_t test_readinfo(void) { | |||
| 45 | ret.bits = (uint8_t)readn(); | 46 | ret.bits = (uint8_t)readn(); |
| 46 | ret.base = (uint8_t)readn(); | 47 | ret.base = (uint8_t)readn(); |
| 47 | ret.maxvalue = (uint8_t)readn(); | 48 | ret.maxvalue = (uint8_t)readn(); |
| 49 | ret.next = readn(); | ||
| 48 | 50 | ||
| 49 | fgets(emptyline, 2, stdin); | 51 | fgets(emptyline, 2, stdin); |
| 50 | 52 | ||
| @@ -67,6 +69,7 @@ void test_writeinfo(tableinfo_t info) { | |||
| 67 | printf("%" PRIu8 "\n", info.bits); | 69 | printf("%" PRIu8 "\n", info.bits); |
| 68 | printf("%" PRIu8 "\n", info.base); | 70 | printf("%" PRIu8 "\n", info.base); |
| 69 | printf("%" PRIu8 "\n", info.maxvalue); | 71 | printf("%" PRIu8 "\n", info.maxvalue); |
| 72 | printf("%" PRIu64 "\n", info.next); | ||
| 70 | printf("\n"); | 73 | printf("\n"); |
| 71 | 74 | ||
| 72 | for (i = 0; i < INFO_DISTRIBUTION_LEN; i++) | 75 | for (i = 0; i < INFO_DISTRIBUTION_LEN; i++) |
