X-Git-Url: https://pd.if.org/git/?p=hexagon;a=blobdiff_plain;f=t%2Fadjacency.c;fp=t%2Fadjacency.c;h=2f9d26ed670de9ef16d6ab3783f5763bb0933419;hp=411228805f34b6a1b3d92abbfc09f57175c6ac17;hb=06868ef42497f1cbc480831029f5f69b395dfdd2;hpb=c5a7aa5029146b2bcea5daae53c6aa3e5e33ed04 diff --git a/t/adjacency.c b/t/adjacency.c index 4112288..2f9d26e 100644 --- a/t/adjacency.c +++ b/t/adjacency.c @@ -3,18 +3,20 @@ #include "ctap.h" int main(void) { - int hex, start, dist; + struct HL_hex hex, start; + + int dist; int x, y, i; 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); }