mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
15 lines
497 B
Plaintext
15 lines
497 B
Plaintext
//These operators should short-circuit
|
|
assert (true && false) == false, "(true && false) == false failed";
|
|
assert (false && true) == false, "(false && true) == false failed";
|
|
|
|
assert (true || false) == true, "(true || false) == true failed";
|
|
assert (false || true) == true, "(false || true) == true failed";
|
|
|
|
|
|
//make sure the right value is being returned when chained
|
|
assert "a" && "b" && "c" == "c", "chained && failed";
|
|
assert "a" || "b" || "c" == "a", "chained || failed";
|
|
|
|
|
|
print "All good";
|