summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-06-12 12:46:50 -0400
committerOri Bernstein <ori@eigenstate.org>2015-06-12 14:01:54 -0400
commit21b91ad9fa7ae830272dc67fbe3150dc30921702 (patch)
treea674ea3e28f90ba8fa2f4521069a010b4742961e /test
parent96c8217e913d8d6de22bbb1aa3624c26e66838fc (diff)
downloadmc-21b91ad9fa7ae830272dc67fbe3150dc30921702.tar.gz
Move fmt to fmt2.
Shit seems to work.
Diffstat (limited to 'test')
-rw-r--r--test/align.myr22
-rw-r--r--test/bigcondarg.myr4
-rw-r--r--test/bigliteral.myr2
-rw-r--r--test/catfile.myr2
-rw-r--r--test/constslice.myr6
-rw-r--r--test/doublecall.myr2
-rw-r--r--test/foldidx.myr2
-rw-r--r--test/genericmake.myr2
-rw-r--r--test/loop.myr6
-rw-r--r--test/matchunion_sl.myr2
-rw-r--r--test/nestucon.myr2
-rw-r--r--test/patiter.myr4
-rw-r--r--test/strfind.myr2
-rw-r--r--test/strjoin.myr6
-rw-r--r--test/strsplit.myr6
-rw-r--r--test/strstrip.myr30
-rw-r--r--test/strtab.myr2
-rw-r--r--test/subrangefor.myr2
-rw-r--r--test/traitimpl.myr2
-rw-r--r--test/uconinit.myr2
20 files changed, 54 insertions, 54 deletions
diff --git a/test/align.myr b/test/align.myr
index 06555df..a103817 100644
--- a/test/align.myr
+++ b/test/align.myr
@@ -53,18 +53,18 @@ type alignstruct7 = struct
;;
const main = {
- std.put("size = %i\n", sizeof(alignstruct0))
- std.put("size = %i\n", sizeof(alignstruct1))
- std.put("size = %i\n", sizeof(alignstruct2))
- std.put("size = %i\n", sizeof(alignstruct3))
- std.put("size = %i\n", sizeof(alignstruct4))
- std.put("size = %i\n", sizeof(alignstruct5))
- std.put("size = %i\n", sizeof(alignstruct6))
- std.put("size = %i\n", sizeof(alignstruct7))
+ std.put("size = {}\n", sizeof(alignstruct0))
+ std.put("size = {}\n", sizeof(alignstruct1))
+ std.put("size = {}\n", sizeof(alignstruct2))
+ std.put("size = {}\n", sizeof(alignstruct3))
+ std.put("size = {}\n", sizeof(alignstruct4))
+ std.put("size = {}\n", sizeof(alignstruct5))
+ std.put("size = {}\n", sizeof(alignstruct6))
+ std.put("size = {}\n", sizeof(alignstruct7))
/* size should be 8 */
- std.put("size = %i\n", sizeof((int, byte, byte)))
+ std.put("size = {}\n", sizeof((int, byte, byte)))
/* size should be 16 */
- std.put("size = %i\n", sizeof((int, byte, int, byte)))
+ std.put("size = {}\n", sizeof((int, byte, int, byte)))
/* size should be 12 */
- std.put("size = %i\n", sizeof((int, int, byte, byte)))
+ std.put("size = {}\n", sizeof((int, int, byte, byte)))
}
diff --git a/test/bigcondarg.myr b/test/bigcondarg.myr
index 2615749..6af216e 100644
--- a/test/bigcondarg.myr
+++ b/test/bigcondarg.myr
@@ -21,9 +21,9 @@ generic expect = {a : @a, b : @a, expected : bool
actual = false
;;
if actual == expected
- std.put("a == b: expected: %t, got, %t: pass\n", expected, actual)
+ std.put("a == b: expected: {}, got, {}: pass\n", expected, actual)
else
- std.put("a == b: expected: %t, got, %t: fail\n", expected, actual)
+ std.put("a == b: expected: {}, got, {}: fail\n", expected, actual)
;;
}
diff --git a/test/bigliteral.myr b/test/bigliteral.myr
index bd310d6..5a04ffa 100644
--- a/test/bigliteral.myr
+++ b/test/bigliteral.myr
@@ -1,5 +1,5 @@
use std
const main = {
- std.put("%l\n", 34359738368 castto(int64))
+ std.put("{}\n", 34359738368 castto(int64))
}
diff --git a/test/catfile.myr b/test/catfile.myr
index b766209..f41e23f 100644
--- a/test/catfile.myr
+++ b/test/catfile.myr
@@ -7,7 +7,7 @@ const main = {args : byte[:][:]
r = std.slurp("data/catfile-in")
match r
| `std.Ok dat: std.write(1, dat)
- | `std.Fail msg: std.put("Failed to read file: %s\n", msg)
+ | `std.Fail msg: std.put("Failed to read file: {}\n", msg)
;;
-> 0
}
diff --git a/test/constslice.myr b/test/constslice.myr
index 2065220..588f3ca 100644
--- a/test/constslice.myr
+++ b/test/constslice.myr
@@ -8,15 +8,15 @@ const array = [1,2,3,4,5]
const main = {
/* expected output 23 */
for x in slpart
- std.put("%i", x)
+ std.put("{}", x)
;;
/* expected output 12345 */
for x in slfull
- std.put("%i", x)
+ std.put("{}", x)
;;
/* expected output 678 */
for x in slinline
- std.put("%i", x)
+ std.put("{}", x)
;;
std.put("\n")
}
diff --git a/test/doublecall.myr b/test/doublecall.myr
index efaa921..2248ee7 100644
--- a/test/doublecall.myr
+++ b/test/doublecall.myr
@@ -1,7 +1,7 @@
use std
const main = {
- std.put("%i,%w\n", a(), b())
+ std.put("{},{}\n", a(), b())
}
const a = {
diff --git a/test/foldidx.myr b/test/foldidx.myr
index 60489fa..d6916b6 100644
--- a/test/foldidx.myr
+++ b/test/foldidx.myr
@@ -11,6 +11,6 @@ const z : xy[1] = [
]
const main = {
- std.put("%i,%i\n", z[0].x, z[0].y)
+ std.put("{},{}\n", z[0].x, z[0].y)
}
diff --git a/test/genericmake.myr b/test/genericmake.myr
index 819dc82..8b6768b 100644
--- a/test/genericmake.myr
+++ b/test/genericmake.myr
@@ -14,7 +14,7 @@ const main = {
x = make(123)
match x
- | `std.Some v: std.put("val = %i\n", v)
+ | `std.Some v: std.put("val = {}\n", v)
| `std.None: std.die("Unreachable\n")
;;
}
diff --git a/test/loop.myr b/test/loop.myr
index 6bf93cf..02260fa 100644
--- a/test/loop.myr
+++ b/test/loop.myr
@@ -6,19 +6,19 @@ const main = {
n = 0
for i = 0; i < 5; ++i
- std.put("%i", i)
+ std.put("{}", i)
;;
for i = 0; i < 5; ++i
if i > 3
break
;;
- std.put("%i", i)
+ std.put("{}", i)
;;
for i = 0; i < 10; ++i
if i < 6
continue
;;
- std.put("%i", i)
+ std.put("{}", i)
;;
std.put("\n")
}
diff --git a/test/matchunion_sl.myr b/test/matchunion_sl.myr
index e8f9dd7..34f17f5 100644
--- a/test/matchunion_sl.myr
+++ b/test/matchunion_sl.myr
@@ -13,7 +13,7 @@ const main = {
v = `Str "foo"
match v
| `Int 127: std.exit(42)
- | `Str s: std.put("%s\n", s)
+ | `Str s: std.put("{}\n", s)
| `Nil:
| _: std.die("Impossible match failure\n")
;;
diff --git a/test/nestucon.myr b/test/nestucon.myr
index deee01e..747ca59 100644
--- a/test/nestucon.myr
+++ b/test/nestucon.myr
@@ -12,7 +12,7 @@ const main = {
a = [.x = `Str "asdf"]
match a
- | [.x=`Str s]: std.put("%s\n", s)
+ | [.x=`Str s]: std.put("{}\n", s)
| _: std.die("Impossible match failure\n")
;;
}
diff --git a/test/patiter.myr b/test/patiter.myr
index 4016a36..aee5883 100644
--- a/test/patiter.myr
+++ b/test/patiter.myr
@@ -3,11 +3,11 @@ use std
const main = {
/* should print 1,3,5, skipping 4 */
for (1,x) in [(1,2),(1,3),(2,4),(1,5)]
- std.put("%i", x)
+ std.put("{}", x)
;;
/* should print 1, 2 skipping `None */
for `std.Some v in [`std.None, `std.Some 1, `std.Some 2]
- std.put("%i", v)
+ std.put("{}", v)
;;
std.put("\n")
}
diff --git a/test/strfind.myr b/test/strfind.myr
index be33714..aa55619 100644
--- a/test/strfind.myr
+++ b/test/strfind.myr
@@ -15,7 +15,7 @@ const main = {
const printloc = {l
match l
- | `std.Some loc: std.put("Found %z\n", loc)
+ | `std.Some loc: std.put("Found {}\n", loc)
| `std.None: std.put("No match\n")
;;
}
diff --git a/test/strjoin.myr b/test/strjoin.myr
index cde44c6..8b291e7 100644
--- a/test/strjoin.myr
+++ b/test/strjoin.myr
@@ -7,7 +7,7 @@ const main = {
"z",
"w"
]
- std.put("%s\n", std.strcat("foo;", "bar"))
- std.put("%s\n", std.strjoin(strings[:], ""))
- std.put("%s\n", std.strjoin(strings[:], ":"))
+ std.put("{}\n", std.strcat("foo;", "bar"))
+ std.put("{}\n", std.strjoin(strings[:], ""))
+ std.put("{}\n", std.strjoin(strings[:], ":"))
}
diff --git a/test/strsplit.myr b/test/strsplit.myr
index cf46549..ea46734 100644
--- a/test/strsplit.myr
+++ b/test/strsplit.myr
@@ -6,19 +6,19 @@ const main = {
sp = std.strsplit("a,b,c,d", ",")
for i = 0; i < sp.len; i++
- std.put("\"%s\"\n", sp[i])
+ std.put("\"{}\"\n", sp[i])
;;
std.slfree(sp)
sp = std.strsplit("a,,b,c,,d", ",")
for i = 0; i < sp.len; i++
- std.put("\"%s\"\n", sp[i])
+ std.put("\"{}\"\n", sp[i])
;;
std.slfree(sp)
sp = std.strsplit("a--b---b--c---c-d--d", "---")
for i = 0; i < sp.len; i++
- std.put("\"%s\"\n", sp[i])
+ std.put("\"{}\"\n", sp[i])
;;
std.slfree(sp)
}
diff --git a/test/strstrip.myr b/test/strstrip.myr
index 733e68e..32dc475 100644
--- a/test/strstrip.myr
+++ b/test/strstrip.myr
@@ -1,27 +1,27 @@
use std
const main = {
- std.put("\"%s\"\n", std.strstrip("cccc"))
- std.put("\"%s\"\n", std.strfstrip("cccc"))
- std.put("\"%s\"\n", std.strrstrip("cccc"))
+ std.put("\"{}\"\n", std.strstrip("cccc"))
+ std.put("\"{}\"\n", std.strfstrip("cccc"))
+ std.put("\"{}\"\n", std.strrstrip("cccc"))
std.put("--\n")
- std.put("\"%s\"\n", std.strstrip(" abc "))
- std.put("\"%s\"\n", std.strfstrip(" abc "))
- std.put("\"%s\"\n", std.strrstrip(" abc "))
+ std.put("\"{}\"\n", std.strstrip(" abc "))
+ std.put("\"{}\"\n", std.strfstrip(" abc "))
+ std.put("\"{}\"\n", std.strrstrip(" abc "))
std.put("--\n")
- std.put("\"%s\"\n", std.strstrip(" 世界 "))
- std.put("\"%s\"\n", std.strfstrip(" 世界 "))
- std.put("\"%s\"\n", std.strrstrip(" 世界 "))
+ std.put("\"{}\"\n", std.strstrip(" 世界 "))
+ std.put("\"{}\"\n", std.strfstrip(" 世界 "))
+ std.put("\"{}\"\n", std.strrstrip(" 世界 "))
std.put("--\n")
- std.put("\"%s\"\n", std.strstrip(" "))
- std.put("\"%s\"\n", std.strfstrip(" "))
- std.put("\"%s\"\n", std.strrstrip(" "))
+ std.put("\"{}\"\n", std.strstrip(" "))
+ std.put("\"{}\"\n", std.strfstrip(" "))
+ std.put("\"{}\"\n", std.strrstrip(" "))
std.put("--\n")
- std.put("\"%s\"\n", std.strstrip(""))
- std.put("\"%s\"\n", std.strfstrip(""))
- std.put("\"%s\"\n", std.strrstrip(""))
+ std.put("\"{}\"\n", std.strstrip(""))
+ std.put("\"{}\"\n", std.strfstrip(""))
+ std.put("\"{}\"\n", std.strrstrip(""))
}
diff --git a/test/strtab.myr b/test/strtab.myr
index 115efca..309df6f 100644
--- a/test/strtab.myr
+++ b/test/strtab.myr
@@ -10,7 +10,7 @@ const strtab = [
const main = {
var i
for i = 0; i < strtab.len; i++
- std.put("%i: %s\n", i, strtab[i])
+ std.put("{}: {}\n", i, strtab[i])
;;
std.exit(0)
}
diff --git a/test/subrangefor.myr b/test/subrangefor.myr
index 0a3acc4..7d397dd 100644
--- a/test/subrangefor.myr
+++ b/test/subrangefor.myr
@@ -2,7 +2,7 @@ use std
const main = {
for i in [1,2,3,4][:2]
- std.put("%i", i)
+ std.put("{}", i)
;;
std.put("\n")
}
diff --git a/test/traitimpl.myr b/test/traitimpl.myr
index 172478f..6299b43 100644
--- a/test/traitimpl.myr
+++ b/test/traitimpl.myr
@@ -31,6 +31,6 @@ const main = {
a = foo(123)
b = foo(11 castto(int16))
c = frob("meeeeeeh")
- std.put("%i,%w,%s\n", a, b, c)
+ std.put("{},{},{}\n", a, b, c)
}
diff --git a/test/uconinit.myr b/test/uconinit.myr
index 824879b..768df31 100644
--- a/test/uconinit.myr
+++ b/test/uconinit.myr
@@ -13,7 +13,7 @@ const main = {
match v
| `A: std.put("A ")
| `B: std.put("B ")
- | `C x: std.put("C %i\n", x)
+ | `C x: std.put("C {}\n", x)
;;
;;
std.put("\n")