X-Git-Url: https://pd.if.org/git/?p=hexagon;a=blobdiff_plain;f=t%2Fcantor.c;h=1e7dbf6e8c6358f46cafdc07ab622e786ba83b46;hp=0f179d20e1c724b8b06ecc8c63648f268d6727f3;hb=ce4fd67e5bfd07192ca5cb357798aaa3588512e4;hpb=8ca2b8a06b00066a20f744a61c9bcdd65949a344 diff --git a/t/cantor.c b/t/cantor.c index 0f179d2..1e7dbf6 100644 --- a/t/cantor.c +++ b/t/cantor.c @@ -2,7 +2,7 @@ #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; }