summaryrefslogtreecommitdiff
path: root/test/slice.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2012-06-06 11:13:47 -0400
committerOri Bernstein <ori@eigenstate.org>2012-06-06 11:13:47 -0400
commitf0003c878c3274a7f710cd240571875ddd904002 (patch)
tree8fa13f4135db2d7051efa4445474deb799c56ba0 /test/slice.myr
parent6043574976f7135190d98a100db3519a65850d55 (diff)
downloadmc-f0003c878c3274a7f710cd240571875ddd904002.tar.gz
Add slice test.
Diffstat (limited to 'test/slice.myr')
-rw-r--r--test/slice.myr10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/slice.myr b/test/slice.myr
new file mode 100644
index 0000000..34850f2
--- /dev/null
+++ b/test/slice.myr
@@ -0,0 +1,10 @@
+const msin = {
+ var a : int[3]
+ var s
+
+ s = a[0,3]
+ s[0] = 3
+ s[1] = 4
+ s[2] = s[0] + s[1]
+ -> s[2]
+}