this repo has no description
1int: wa;
2int: nt;
3int: sa;
4int: q;
5int: nsw;
6int: v;
7int: t;
8
9test check(bool: b,string: s) =
10 if b then true else trace_stdout("ERROR: "++s++"\n",false) endif;
11
12array[int] of bool: checks = [
13 check(wa!=nt, "wa and nt have the same colour"),
14 check(wa!=sa, "wa and sa have the same colour"),
15 check(nt!=sa, "nt and sa have the same colour"),
16 check(nt!=q, "nt and q have the same colour"),
17 check(sa!=q, "sa and q have the same colour"),
18 check(sa!=nsw, "sa and nsw have the same colour"),
19 check(sa!=v, "sa and v have the same colour"),
20 check(q!=nsw, "q and nsw have the same colour"),
21 check(nsw!=v, "nsw and v have the same colour")
22];
23
24output [
25 if forall(checks)
26 then "CORRECT: all constraints hold.\n"
27 else "INCORRECT\n"
28 endif
29];