shithub: mc

Download patch

ref: f0003c878c3274a7f710cd240571875ddd904002
parent: 6043574976f7135190d98a100db3519a65850d55
author: Ori Bernstein <[email protected]>
date: Wed Jun 6 07:13:47 EDT 2012

Add slice test.

--- a/test/build.sh
+++ b/test/build.sh
@@ -18,5 +18,6 @@
 build call
 build loop
 build fib
+build slice
 
 exit 0
--- /dev/null
+++ b/test/slice.myr
@@ -1,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]
+}
--- a/test/test.sh
+++ b/test/test.sh
@@ -26,3 +26,4 @@
 returns call 42
 returns loop 45
 returns fib 21
+returns slice 7