summaryrefslogtreecommitdiff
path: root/lib/std/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-07-17 15:30:01 -0700
committerOri Bernstein <ori@markovcorp.com>2017-07-17 15:30:01 -0700
commit492aca3ff6f829ee09c52e17c86a808430ee7df4 (patch)
treef97424e14c9d3277c78ff53082daec725e1f4dcb /lib/std/test
parent11f79ed8ff75049f6b1866d70bc032c8d18b1463 (diff)
downloadmc-492aca3ff6f829ee09c52e17c86a808430ee7df4.tar.gz
Convert from `in` to `:`.
The winds of change are a-blowin.
Diffstat (limited to 'lib/std/test')
-rw-r--r--lib/std/test/bitset.myr4
-rw-r--r--lib/std/test/bytealloc.myr4
-rw-r--r--lib/std/test/fmt.myr2
-rw-r--r--lib/std/test/ipparse.myr4
-rw-r--r--lib/std/test/iterutil.myr6
-rw-r--r--lib/std/test/striter.myr4
6 files changed, 12 insertions, 12 deletions
diff --git a/lib/std/test/bitset.myr b/lib/std/test/bitset.myr
index 0415be8..13706a6 100644
--- a/lib/std/test/bitset.myr
+++ b/lib/std/test/bitset.myr
@@ -36,7 +36,7 @@ const main = {
std.bsput(bs, 16)
std.bsput(bs, 7)
std.bsput(bs, 3)
- for e in std.bybsvalue(bs)
+ for e : std.bybsvalue(bs)
testr.check(ctx, e == expected[i], "expected[{}] ({}) != {}", i, e, expected[i])
i++
;;
@@ -63,7 +63,7 @@ const mkset = {elts
var bs
bs = std.mkbs()
- for e in elts
+ for e : elts
std.bsput(bs, e)
;;
-> bs
diff --git a/lib/std/test/bytealloc.myr b/lib/std/test/bytealloc.myr
index e6d87d6..7da7de8 100644
--- a/lib/std/test/bytealloc.myr
+++ b/lib/std/test/bytealloc.myr
@@ -3,9 +3,9 @@ use std
const main = {
var a : byte#[1000]
- for sz in [10, 100, 1000, 10000, 10000]
+ for sz : [10, 100, 1000, 10000, 10000]
std.put("sz: {}\n", sz)
- for cnt in [1, 10, 100]
+ for cnt : [1, 10, 100]
std.put("cnt: {}\n", cnt)
/* alloc forwards, dealloc forwards */
for var i = 0; i < cnt; i++
diff --git a/lib/std/test/fmt.myr b/lib/std/test/fmt.myr
index e8e3f22..67ba2e4 100644
--- a/lib/std/test/fmt.myr
+++ b/lib/std/test/fmt.myr
@@ -154,7 +154,7 @@ const pairfmt = {sb, ap, opts
x = std.vanext(ap)
std.sbfmt(sb, "formatted a pair: [{}, {}]", x.x, x.y)
- for opt in opts
+ for opt : opts
std.sbputc(sb, ' ')
match opt
| ("x", val): std.sbfmt(sb, "x={}", val)
diff --git a/lib/std/test/ipparse.myr b/lib/std/test/ipparse.myr
index 1ea14db..fd6140a 100644
--- a/lib/std/test/ipparse.myr
+++ b/lib/std/test/ipparse.myr
@@ -69,11 +69,11 @@ const eq = {ip, expected
if !std.sleq(p, e)
std.fput(1, "misparsed ip {}\n", ip)
std.put("parsed: ")
- for b in p
+ for b : p
std.put("{x}, ", b)
;;
std.put("\nexpected: ")
- for b in e
+ for b : e
std.put("{x}, ", b)
;;
std.put("\n")
diff --git a/lib/std/test/iterutil.myr b/lib/std/test/iterutil.myr
index dfa46fa..1d45a4d 100644
--- a/lib/std/test/iterutil.myr
+++ b/lib/std/test/iterutil.myr
@@ -4,21 +4,21 @@ const main = {
var n
n = 0
- for (x, i) in std.byenum([1,3,5,7,9][:])
+ 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) in std.byzip([0,2,4,6,8][:], [2,4][:])
+ 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 in std.byreverse([3, 2, 1, 0][:])
+ for x : std.byreverse([3, 2, 1, 0][:])
std.assert(x == n, "invalid reversed value {}, expected {}", x, n)
n++
;;
diff --git a/lib/std/test/striter.myr b/lib/std/test/striter.myr
index 2684f8d..90b38ed 100644
--- a/lib/std/test/striter.myr
+++ b/lib/std/test/striter.myr
@@ -6,13 +6,13 @@ const main = {
var i
i = 0
- for c in std.bychar("abc")
+ for c : std.bychar("abc")
std.assert(chars[i++] == c, "wrong char")
;;
std.assert(i == chars.len, "wrong split count")
i = 0
- for sp in std.bysplit("foo+++bar", "++")
+ for sp : std.bysplit("foo+++bar", "++")
std.assert(std.streq(splits[i++], sp), "wrong split {}", sp)
;;
std.assert(i == splits.len, "wrong split count")