From 270e5b0444f67781856bf80db51650af9cb89b0c Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Thu, 17 Jul 2025 08:54:44 +0200 Subject: Renamed tests to make space for more coordinate tests --- test/110_gendata_cocsep/00_all.in | 0 test/110_gendata_cocsep/00_all.out | 13 +++++++++++++ test/110_gendata_cocsep/gendata_cocsep_tests.c | 27 ++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 test/110_gendata_cocsep/00_all.in create mode 100644 test/110_gendata_cocsep/00_all.out create mode 100644 test/110_gendata_cocsep/gendata_cocsep_tests.c (limited to 'test/110_gendata_cocsep') diff --git a/test/110_gendata_cocsep/00_all.in b/test/110_gendata_cocsep/00_all.in new file mode 100644 index 0000000..e69de29 diff --git a/test/110_gendata_cocsep/00_all.out b/test/110_gendata_cocsep/00_all.out new file mode 100644 index 0000000..82eb6c2 --- /dev/null +++ b/test/110_gendata_cocsep/00_all.out @@ -0,0 +1,13 @@ +1120256 +Classes: 3393 +Max value: 9 +0: 1 +1: 6 +2: 63 +3: 468 +4: 3068 +5: 15438 +6: 53814 +7: 71352 +8: 8784 +9: 96 diff --git a/test/110_gendata_cocsep/gendata_cocsep_tests.c b/test/110_gendata_cocsep/gendata_cocsep_tests.c new file mode 100644 index 0000000..c1eef77 --- /dev/null +++ b/test/110_gendata_cocsep/gendata_cocsep_tests.c @@ -0,0 +1,27 @@ +#include "../test.h" + +#define BUF_SIZE 2000000 + +size_t gendata_cocsep(unsigned char *, uint64_t *, cube_t *); +int64_t readtableinfo(size_t, const unsigned char *, tableinfo_t *); + +void run(void) { + unsigned char buf[BUF_SIZE]; + uint32_t i; + uint64_t selfsim[COCSEP_CLASSES]; + cube_t rep[COCSEP_CLASSES]; + size_t result; + tableinfo_t info; + + result = gendata_cocsep(buf, selfsim, rep); + if (readtableinfo(BUF_SIZE, buf, &info) != NISSY_OK) { + printf("Error reading info from table\n"); + return; + } + + printf("%zu\n", result); + printf("Classes: %" PRIu64 "\n", info.classes); + printf("Max value: %" PRIu8 "\n", info.maxvalue); + for (i = 0; i < 10; i++) + printf("%" PRIu32 ": %" PRIu64 "\n", i, info.distribution[i]); +} -- cgit v1.3