summaryrefslogtreecommitdiff
path: root/lib/std/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-12-30 19:23:12 -0800
committerOri Bernstein <ori@eigenstate.org>2017-12-30 19:23:12 -0800
commitf4a939a2cfdc00643b02c404b0acbed382964dd0 (patch)
tree107db984a46b56f0803960155dba25977df78aae /lib/std/test
parentb4252aeded2d15592fe940e20f533f113000c61d (diff)
downloadmc-f4a939a2cfdc00643b02c404b0acbed382964dd0.tar.gz
Start cleaning up libstd.
minor formatting, factoring out iterutil.
Diffstat (limited to 'lib/std/test')
-rw-r--r--lib/std/test/iterutil.myr26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/std/test/iterutil.myr b/lib/std/test/iterutil.myr
deleted file mode 100644
index 1d45a4d..0000000
--- a/lib/std/test/iterutil.myr
+++ /dev/null
@@ -1,26 +0,0 @@
-use std
-
-const main = {
- var n
-
- n = 0
- for (x, i) : std.byenum([1,3,5,7,9][:])
- std.assert(x == n, "invalid enum idx {}", x)
- std.assert(i == n*2 + 1, "invalid enum val {}", i)
- n++
- ;;
-
- n = 0
- for (a, b) : std.byzip([0,2,4,6,8][:], [2,4][:])
- std.assert(a == n*2, "invalid val from a: {}", a)
- std.assert(b == n*2 + 2, "invalid val from b: {}", b)
- n++
- ;;
-
- n = 0
- for x : std.byreverse([3, 2, 1, 0][:])
- std.assert(x == n, "invalid reversed value {}, expected {}", x, n)
- n++
- ;;
-
-}