summaryrefslogtreecommitdiff
path: root/lib/std/test/fmt.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-05-17 22:00:50 -0700
committerOri Bernstein <ori@eigenstate.org>2016-05-17 22:00:50 -0700
commit7aac15b2bfcc5eec279aa14f9f199685f9d7e0d9 (patch)
treec9434a55ea6850aee7103f608c6333cfe3148d60 /lib/std/test/fmt.myr
parentc96238b89583ed91e92ad909c507797d00015e95 (diff)
downloadmc-7aac15b2bfcc5eec279aa14f9f199685f9d7e0d9.tar.gz
New syntax for casts.
Diffstat (limited to 'lib/std/test/fmt.myr')
-rw-r--r--lib/std/test/fmt.myr6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/std/test/fmt.myr b/lib/std/test/fmt.myr
index 44e5edd..98b9747 100644
--- a/lib/std/test/fmt.myr
+++ b/lib/std/test/fmt.myr
@@ -49,7 +49,7 @@ const builtins = {
check("a", "{w=0,p=1}", "a")
check(" 10", "{w=10}", 10)
check("0000000010", "{p=0,w=10}", 10)
- check("4294967295", "{p=0,w=10}", -1 castto(uint))
+ check("4294967295", "{p=0,w=10}", (-1 : uint))
check("-000000001", "{p=0,w=10}", -1)
check("xxxxxxxx-1", "{p=x,w=10}", -1)
check(" -1", "{w=10}", -1)
@@ -123,7 +123,7 @@ const installed = {
/* multiple values */
check("formatted a pair: [-10, -10], formatted a pair: [-10, -10]", "{}, {}", p, p)
/* multiple values of different types */
- check("11, formatted a pair: [-10, -10], formatted an int: 111", "{}, {}, {}", 11 castto(byte), p, 111)
+ check("11, formatted a pair: [-10, -10], formatted an int: 111", "{}, {}, {}", (11 : byte), p, 111)
/* in aggregates */
check("[formatted a pair: [-10, -10]]", "{}", [p])
@@ -137,7 +137,7 @@ const intfmt = {sb, ap, opts
std.assert(opts.len == 0, "options passed where none should be")
x = std.vanext(ap)
/* cast to other int type so we don't recurse */
- std.sbfmt(sb, "formatted an int: {}", x castto(int32))
+ std.sbfmt(sb, "formatted an int: {}", (x : int32))
}
const pairfmt = {sb, ap, opts