shithub: mc

Download patch

ref: 5690c5727ebf9fd99213b8c9b81f4e0a7fde715c
parent: e49f3ef67175b25f6e9539dbec3eaf2f2e95eb50
author: Ori Bernstein <[email protected]>
date: Tue Jun 19 18:25:47 EDT 2012

Add test for slice length.

--- /dev/null
+++ b/test/slicelen.myr
@@ -1,0 +1,7 @@
+const main = {
+	var a : int[8]
+	var s
+
+	s = a[1,6]
+	-> s.len
+}
--- a/test/tests
+++ b/test/tests
@@ -25,12 +25,13 @@
 B structret	E	42
 B array		E	7
 B arraylen	E	12
+B slice		E	7
+B slicelen	E	5
 B call		E	42
 B voidcall	E	12
 B callbig	E	42
 B loop		E	45
 B fib		E	21
-B slice		E	7
 B float   	E       1
 B log-and 	E       0
 B log-or  	E       1