mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
If-then-else is working with jump statements
This commit is contained in:
21
test/jumps.toy
Normal file
21
test/jumps.toy
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
//test true jump
|
||||
if (true) {
|
||||
assert true, "if-then failed";
|
||||
}
|
||||
else {
|
||||
assert false, "if-then failed";
|
||||
}
|
||||
|
||||
|
||||
//test false jump
|
||||
if (false) {
|
||||
assert false, "if-then failed";
|
||||
}
|
||||
else {
|
||||
assert true, "if-then failed";
|
||||
}
|
||||
|
||||
|
||||
print "All good";
|
||||
Reference in New Issue
Block a user