summaryrefslogtreecommitdiff
path: root/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 /test
parent11f79ed8ff75049f6b1866d70bc032c8d18b1463 (diff)
downloadmc-492aca3ff6f829ee09c52e17c86a808430ee7df4.tar.gz
Convert from `in` to `:`.
The winds of change are a-blowin.
Diffstat (limited to 'test')
-rw-r--r--test/arraypack.myr2
-rw-r--r--test/constslice.myr6
-rw-r--r--test/custiter.myr2
-rw-r--r--test/empty-struct.myr4
-rw-r--r--test/encodechar.myr2
-rw-r--r--test/patiter.myr4
-rw-r--r--test/subrangefor.myr2
-rw-r--r--test/uconinit.myr2
8 files changed, 12 insertions, 12 deletions
diff --git a/test/arraypack.myr b/test/arraypack.myr
index 51aa1bd..3866791 100644
--- a/test/arraypack.myr
+++ b/test/arraypack.myr
@@ -8,7 +8,7 @@ const a = [
]
const main = {
- for x in a[:]
+ for x : a[:]
std.put("{}", x)
;;
std.put("\n")
diff --git a/test/constslice.myr b/test/constslice.myr
index 588f3ca..d8ec8fb 100644
--- a/test/constslice.myr
+++ b/test/constslice.myr
@@ -7,15 +7,15 @@ const array = [1,2,3,4,5]
const main = {
/* expected output 23 */
- for x in slpart
+ for x : slpart
std.put("{}", x)
;;
/* expected output 12345 */
- for x in slfull
+ for x : slfull
std.put("{}", x)
;;
/* expected output 678 */
- for x in slinline
+ for x : slinline
std.put("{}", x)
;;
std.put("\n")
diff --git a/test/custiter.myr b/test/custiter.myr
index 53238cd..ef44051 100644
--- a/test/custiter.myr
+++ b/test/custiter.myr
@@ -25,7 +25,7 @@ const main = {
var x : int
r = [.lo=6, .hi=11]
- for v in r
+ for v : r
x = v
std.put("{}", x)
;;
diff --git a/test/empty-struct.myr b/test/empty-struct.myr
index a3ec75a..557522a 100644
--- a/test/empty-struct.myr
+++ b/test/empty-struct.myr
@@ -14,11 +14,11 @@ const main = {
var z : foo[0]
var b : bar = [.baz = [a, a][:], .quux = [z, z, z][:]]
var c : int = 0
- for f in b.baz
+ for f : b.baz
c += 3
;;
- for f in b.quux
+ for f : b.quux
c += 5
;;
diff --git a/test/encodechar.myr b/test/encodechar.myr
index 9cc3385..f7da629 100644
--- a/test/encodechar.myr
+++ b/test/encodechar.myr
@@ -11,7 +11,7 @@ const chartypes = {
var buf : byte[32]
s = "1世界äa\n"
- for c in std.bychar(s)
+ for c : std.bychar(s)
foo = c
if std.encode(buf[:std.charlen(c)], c) == 0
std.write(1, "couldn't encode\n")
diff --git a/test/patiter.myr b/test/patiter.myr
index aee5883..9557e16 100644
--- a/test/patiter.myr
+++ b/test/patiter.myr
@@ -2,11 +2,11 @@ use std
const main = {
/* should print 1,3,5, skipping 4 */
- for (1,x) in [(1,2),(1,3),(2,4),(1,5)]
+ for (1,x) : [(1,2),(1,3),(2,4),(1,5)]
std.put("{}", x)
;;
/* should print 1, 2 skipping `None */
- for `std.Some v in [`std.None, `std.Some 1, `std.Some 2]
+ for `std.Some v : [`std.None, `std.Some 1, `std.Some 2]
std.put("{}", v)
;;
std.put("\n")
diff --git a/test/subrangefor.myr b/test/subrangefor.myr
index 7d397dd..6a8384f 100644
--- a/test/subrangefor.myr
+++ b/test/subrangefor.myr
@@ -1,7 +1,7 @@
use std
const main = {
- for i in [1,2,3,4][:2]
+ for i : [1,2,3,4][:2]
std.put("{}", i)
;;
std.put("\n")
diff --git a/test/uconinit.myr b/test/uconinit.myr
index 768df31..cd7e4a2 100644
--- a/test/uconinit.myr
+++ b/test/uconinit.myr
@@ -9,7 +9,7 @@ type u = union
const a = [`A, `B, `C 123]
const main = {
- for v in a
+ for v : a
match v
| `A: std.put("A ")
| `B: std.put("B ")