aboutsummaryrefslogtreecommitdiffstats
path: root/progs/tests/tuple/basic.sy
diff options
context:
space:
mode:
Diffstat (limited to 'progs/tests/tuple/basic.sy')
-rw-r--r--progs/tests/tuple/basic.sy24
1 files changed, 24 insertions, 0 deletions
diff --git a/progs/tests/tuple/basic.sy b/progs/tests/tuple/basic.sy
new file mode 100644
index 0000000..642e381
--- /dev/null
+++ b/progs/tests/tuple/basic.sy
@@ -0,0 +1,24 @@
+start :: fn {
+ a := (1,2)
+ a[0] <=> 1
+ a[1] <=> 2
+
+ b := (1,)
+ b[0] <=> 1
+
+ empty := ()
+ c := (empty,)
+ c[0] <=> ()
+
+ d := (1,2)
+ d[0] <=> d[0]
+
+ {
+ q := d[2-2]
+ d[d[(5 + 3) * 0]] <=> d[d[(5 + 3) * 0]]
+ w := d[0]
+ q + w
+ q - w
+ q * w
+ }
+}