summaryrefslogtreecommitdiff
path: root/test/constslice.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-01-07 11:34:39 -0500
committerOri Bernstein <ori@eigenstate.org>2014-01-07 11:34:39 -0500
commitc4b85bb8c16c1a80775985774aabda635b43d694 (patch)
tree74b279d11728b34925d34e0652121ccf1c2b68bf /test/constslice.myr
parentbc9013256fb5a406c53829fe6d4cad8325243347 (diff)
downloadmc-c4b85bb8c16c1a80775985774aabda635b43d694.tar.gz
Add test for constant slices off of arrays.
Diffstat (limited to 'test/constslice.myr')
-rw-r--r--test/constslice.myr12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/constslice.myr b/test/constslice.myr
new file mode 100644
index 0000000..c14fd09
--- /dev/null
+++ b/test/constslice.myr
@@ -0,0 +1,12 @@
+use std
+
+const sl = array[1:3]
+const array = [1,2,3,4,5]
+
+const main = {
+ /* expected output 23 */
+ for x in sl
+ std.put("%i\n", x)
+ ;;
+ std.put("\n")
+}