X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=t%2Fadjacency.c;h=2f9d26ed670de9ef16d6ab3783f5763bb0933419;hb=HEAD;hp=dc2c64fbb8c6bce8b3f89093783338570b82de7f;hpb=8ca2b8a06b00066a20f744a61c9bcdd65949a344;p=hexagon diff --git a/t/adjacency.c b/t/adjacency.c index dc2c64f..2f9d26e 100644 --- a/t/adjacency.c +++ b/t/adjacency.c @@ -1,25 +1,27 @@ #include "hexagon.h" -#include "tap.h" +#include "ctap.h" int main(void) { - int hex, start, dist; + struct HL_hex hex, start; + + int dist; int x, y, i; - plan_tests(294); + plan(294); for (x = -3 ; x <= 3; x++) { for (y = -3 ; y <= 3; y++) { - start = HL_cantor_xy(x, y); + start = HL_hex_xy(x, y); for (i = 0; i < 6; i++) { hex = HL_adjhex(start, i); dist = HL_distance(hex, start); - ok(dist == 1, + is_int((long)dist, 1L, "%d, %d direction %d distance one", x, y, i); } } } - return exit_status(); + return 0; }