let todo_desc = "TODO description"; // Test that a value is true. let ok = module{ // test value expected to be true for success. test=false, // descriptive message to use in output. desc=todo_desc, } => ({ok=ok, desc=desc}) { (mod.desc != NULL) || fail "description can't be null"; let ok = mod.test; let desc = "@" % (mod.desc); }; // Test that a value is not true. let not_ok = module{ // Test value expected to to be false for success. test=true, // descriptive message to use in output. desc=todo_desc, } => ({ok=ok, desc=desc}) { (mod.desc != NULL) || fail "description can't be null"; let ok = not mod.test; let desc = "@" % (mod.desc); }; // Asserts that two values are equal. Does deep equal comparisons. let equal = module{ // Left value for deep equal comparison. left=NULL, // right value for deep equal comparison. right=NULL, desc="", } => ({ok=ok, desc=desc}) { (mod.desc != NULL) || fail "description can't be null"; let ok = mod.left == mod.right; let desc = select ((mod.desc == ""), "@ == @" % (mod.left, mod.right)) => { false = mod.desc, }; }; // Asserts that two values are not equal. Does deep equal comparisons. let not_equal = module{ // Left value for deep equal comparison. left=NULL, // right value for deep equal comparison. right=NULL, desc="", } => ({ok=ok, desc=desc}) { (mod.desc != NULL) || fail "description can't be null"; let ok = mod.left != mod.right; let desc = select ((mod.desc == ""), "@ != @" % (mod.left, mod.right)) => { false = mod.desc, }; };