diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-03-30 19:50:45 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-03-30 19:50:45 +0100 |
| commit | a37181b1c2ae6251bba75d5ed7a896d47a26f961 (patch) | |
| tree | 51079aea6135d69340393aaab346827fe056b444 /test/100_gendata_cocsep | |
| parent | c14e780551c4e7aa88d99b226b12f7cdd7b92527 (diff) | |
| download | nissy-core-a37181b1c2ae6251bba75d5ed7a896d47a26f961.tar.gz nissy-core-a37181b1c2ae6251bba75d5ed7a896d47a26f961.zip | |
Improved testing, added more data to cocsep table
Diffstat (limited to 'test/100_gendata_cocsep')
| -rw-r--r-- | test/100_gendata_cocsep/00_all.out | 14 | ||||
| -rw-r--r-- | test/100_gendata_cocsep/gendata_cocsep_tests.c | 6 |
2 files changed, 18 insertions, 2 deletions
diff --git a/test/100_gendata_cocsep/00_all.out b/test/100_gendata_cocsep/00_all.out index 37b8c1d..e14b938 100644 --- a/test/100_gendata_cocsep/00_all.out +++ b/test/100_gendata_cocsep/00_all.out | |||
| @@ -1 +1,13 @@ | |||
| 1 | 1119788 | 1 | 1119792 |
| 2 | Classes: 3393 | ||
| 3 | Max value: 9 | ||
| 4 | 0: 1 | ||
| 5 | 1: 6 | ||
| 6 | 2: 63 | ||
| 7 | 3: 468 | ||
| 8 | 4: 3068 | ||
| 9 | 5: 15438 | ||
| 10 | 6: 53814 | ||
| 11 | 7: 71352 | ||
| 12 | 8: 8784 | ||
| 13 | 9: 96 | ||
diff --git a/test/100_gendata_cocsep/gendata_cocsep_tests.c b/test/100_gendata_cocsep/gendata_cocsep_tests.c index 19dfa9f..36dd5ce 100644 --- a/test/100_gendata_cocsep/gendata_cocsep_tests.c +++ b/test/100_gendata_cocsep/gendata_cocsep_tests.c | |||
| @@ -3,12 +3,16 @@ | |||
| 3 | size_t gendata_cocsep(void *); | 3 | size_t gendata_cocsep(void *); |
| 4 | 4 | ||
| 5 | int main(void) { | 5 | int main(void) { |
| 6 | uint32_t buf[300000]; | 6 | uint32_t buf[300000], i; |
| 7 | size_t result; | 7 | size_t result; |
| 8 | 8 | ||
| 9 | result = gendata_cocsep(buf); | 9 | result = gendata_cocsep(buf); |
| 10 | 10 | ||
| 11 | printf("%zu\n", result); | 11 | printf("%zu\n", result); |
| 12 | printf("Classes: %" PRIu32 "\n", buf[result/4-12]); | ||
| 13 | printf("Max value: %" PRIu32 "\n", buf[result/4-11]); | ||
| 14 | for (i = 0; i < 10; i++) | ||
| 15 | printf("%" PRIu32 ": %" PRIu32 "\n", i, buf[result/4-10+i]); | ||
| 12 | 16 | ||
| 13 | return 0; | 17 | return 0; |
| 14 | } | 18 | } |
