diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-22 18:07:06 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2025-12-22 18:07:06 +0100 |
| commit | 086a06fe3d84ac8b2e74c824e05f9d23f0b292ab (patch) | |
| tree | 596034b2283b053e023d0988d875396946b9384d /test/080_invcoord_cp | |
| parent | 0c5e4730c699ac006feec4efe25c390977fe372f (diff) | |
| download | nissy-core-086a06fe3d84ac8b2e74c824e05f9d23f0b292ab.tar.gz nissy-core-086a06fe3d84ac8b2e74c824e05f9d23f0b292ab.zip | |
Added tests for copy_co, renamed some tests
Diffstat (limited to 'test/080_invcoord_cp')
| -rw-r--r-- | test/080_invcoord_cp/00_all.in | 0 | ||||
| -rw-r--r-- | test/080_invcoord_cp/00_all.out | 1 | ||||
| -rw-r--r-- | test/080_invcoord_cp/invcoord_cp_tests.c | 32 |
3 files changed, 0 insertions, 33 deletions
diff --git a/test/080_invcoord_cp/00_all.in b/test/080_invcoord_cp/00_all.in deleted file mode 100644 index e69de29..0000000 --- a/test/080_invcoord_cp/00_all.in +++ /dev/null | |||
diff --git a/test/080_invcoord_cp/00_all.out b/test/080_invcoord_cp/00_all.out deleted file mode 100644 index d6109db..0000000 --- a/test/080_invcoord_cp/00_all.out +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | All good | ||
diff --git a/test/080_invcoord_cp/invcoord_cp_tests.c b/test/080_invcoord_cp/invcoord_cp_tests.c deleted file mode 100644 index 7d1e33f..0000000 --- a/test/080_invcoord_cp/invcoord_cp_tests.c +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | #include "../test.h" | ||
| 2 | |||
| 3 | #define FACT_8 40320 | ||
| 4 | |||
| 5 | uint64_t coord_cp(cube_t); | ||
| 6 | cube_t invcoord_cp(uint64_t); | ||
| 7 | |||
| 8 | void run(void) { | ||
| 9 | oriented_cube_t cube; | ||
| 10 | uint64_t coord, coord2; | ||
| 11 | |||
| 12 | cube.orientation = 0; | ||
| 13 | |||
| 14 | /* Test all possible values for CP coordinate */ | ||
| 15 | for (coord = 0; coord < FACT_8; coord++) { | ||
| 16 | cube.cube = invcoord_cp(coord); | ||
| 17 | |||
| 18 | if (!isconsistent(cube)) { | ||
| 19 | printf("Not consistent\n"); | ||
| 20 | return; | ||
| 21 | } | ||
| 22 | |||
| 23 | coord2 = coord_cp(cube.cube); | ||
| 24 | if (coord != coord2) { | ||
| 25 | printf("Error: invcoord of %" PRIu64 | ||
| 26 | " returns %" PRIu64 "\n", coord, coord2); | ||
| 27 | return; | ||
| 28 | } | ||
| 29 | } | ||
| 30 | |||
| 31 | printf("All good\n"); | ||
| 32 | } | ||
