summaryrefslogtreecommitdiff
path: root/test/constslice.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-01-07 13:45:30 -0500
committerOri Bernstein <ori@eigenstate.org>2014-01-07 13:45:30 -0500
commit49173c584d17208134df412148b84862843f5424 (patch)
tree14e2cfc04cbb2c7c70f626a105ce175838eec772 /test/constslice.myr
parent945c62edc1fc6dd17e1883dab8b7bc11d16276ba (diff)
downloadmc-49173c584d17208134df412148b84862843f5424.tar.gz
Expand test to support everything we care about.
Diffstat (limited to 'test/constslice.myr')
-rw-r--r--test/constslice.myr14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/constslice.myr b/test/constslice.myr
index 4b43a37..2065220 100644
--- a/test/constslice.myr
+++ b/test/constslice.myr
@@ -1,11 +1,21 @@
use std
-const sl = array[1:3]
+const slpart = array[1:3]
+const slfull = array[:]
+const slinline = [6,7,8][:]
const array = [1,2,3,4,5]
const main = {
/* expected output 23 */
- for x in sl
+ for x in slpart
+ std.put("%i", x)
+ ;;
+ /* expected output 12345 */
+ for x in slfull
+ std.put("%i", x)
+ ;;
+ /* expected output 678 */
+ for x in slinline
std.put("%i", x)
;;
std.put("\n")