X-Git-Url: https://pd.if.org/git/?p=hexagon;a=blobdiff_plain;f=t%2Fcantor.c;h=1e7dbf6e8c6358f46cafdc07ab622e786ba83b46;hp=a2e929087ea859b07937a024b5889c6c3b3f40bc;hb=ce4fd67e5bfd07192ca5cb357798aaa3588512e4;hpb=8f632e5a3428101590e8cbe94025060c5c3b5ecf diff --git a/t/cantor.c b/t/cantor.c index a2e9290..1e7dbf6 100644 --- a/t/cantor.c +++ b/t/cantor.c @@ -1,8 +1,8 @@ #include -#include "hexmap.h" +#include "hexagon.h" -#include "tap.h" +#include "ctap.h" int main(void) { int xy[2]; @@ -10,7 +10,7 @@ int main(void) { int hex; int x, y; - plan_tests(81*2); + plan(81*4); for (x=-4;x<=4;x++) { for (y=-4;y<=4;y++) { @@ -18,8 +18,10 @@ int main(void) { HL_cantor_arrays(hex, xy, ijk); ok(x == xy[0], "x check %d %d", x, y); ok(y == xy[1], "y check %d %d", x, y); + ok(x == HL_cantor_x(hex), "reverse check x %d %d",hex,x); + ok(x == HL_cantor_x(hex), "reverse check y %d %d",hex,y); } } - return exit_status(); + return 0; }