summaryrefslogtreecommitdiff
path: root/test/slgrow.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-01-03 20:02:07 -0500
committerOri Bernstein <ori@eigenstate.org>2013-01-03 20:02:07 -0500
commit4ec65693a851c2c8d06e2eb2bb281105d006f474 (patch)
treed3a3f9745fccf8f9d1f27da8837af8bd5c275881 /test/slgrow.myr
parentdca5e6339087339e0cd9890b5f91c2b3c9e875aa (diff)
downloadmc-4ec65693a851c2c8d06e2eb2bb281105d006f474.tar.gz
Add test for 'slgrow()' function.
Diffstat (limited to 'test/slgrow.myr')
-rw-r--r--test/slgrow.myr11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/slgrow.myr b/test/slgrow.myr
new file mode 100644
index 0000000..e687a5d
--- /dev/null
+++ b/test/slgrow.myr
@@ -0,0 +1,11 @@
+use std
+
+const main = {
+ var sl
+
+ sl = std.slalloc(42)
+ sl[0] = 12
+ sl = std.slgrow(sl, 123)
+ sl[122] = 30
+ -> sl[0] + sl[122]
+}