aboutsummaryrefslogtreecommitdiffstats
path: root/tests/logic-shortcircuit.bad
diff options
context:
space:
mode:
Diffstat (limited to 'tests/logic-shortcircuit.bad')
-rw-r--r--tests/logic-shortcircuit.bad16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/logic-shortcircuit.bad b/tests/logic-shortcircuit.bad
new file mode 100644
index 0000000..06c8938
--- /dev/null
+++ b/tests/logic-shortcircuit.bad
@@ -0,0 +1,16 @@
1fun ret_true() -> Bool {
2 print("ret_true ")
3 true
4}
5
6fun ret_false() -> Bool {
7 print("ret_false ")
8 false
9}
10
11println("test1 and x 2: " ret_true() and ret_false() and ret_true())
12println("test2 and x 2: " ret_true() and ret_true() and ret_true())
13println("test3 and x 2: " ret_false() and ret_true() and ret_true())
14println("test4 or x 2: " ret_false() or ret_true() or ret_false())
15println("test5 or x 2: " ret_true() or ret_true() or ret_false())
16println("test6: and/or: " ret_true() and (ret_true() or ret_false()))