aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/if.tdy29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/if.tdy b/tests/if.tdy
new file mode 100644
index 0000000..196e221
--- /dev/null
+++ b/tests/if.tdy
@@ -0,0 +1,29 @@
+a int := 0
+res int := 0
+
+if 1 == 2 {
+ <!>
+}
+
+a = 1
+if a == 0 {
+ <!>
+}
+
+a = 1
+res = 0
+if a == 1 {
+ res = 1
+}
+res <=> 1
+
+a = 1
+res = 0
+if a == 0 {
+ <!>
+} else if a == 1 {
+ res = 1
+} else {
+ <!>
+}
+res <=> 1