zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 74ccf56a4b1da78b6cd6b0ac34dd6ded1e15b155 (tree)
parent 3c12ba718029adac707eeb6e86399f71b74c892e
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Sun, 17 Jun 2018 12:33:24 -0400

update more tests

Diffstat:
Mexample/hello_world/hello_libc.zig | 2+-
Mtest/compare_output.zig | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/example/hello_world/hello_libc.zig b/example/hello_world/hello_libc.zig @@ -8,7 +8,7 @@ const c = @cImport({ const msg = c"Hello, world!\n"; export fn main(argc: c_int, argv: **u8) c_int { - if (c.printf(msg) != c_int(c.strlen(msg))) return -1; + if (c.printf(msg) != @intCast(c_int, c.strlen(msg))) return -1; return 0; } diff --git a/test/compare_output.zig b/test/compare_output.zig @@ -299,7 +299,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { \\export fn main() c_int { \\ var array = []u32{ 1, 7, 3, 2, 0, 9, 4, 8, 6, 5 }; \\ - \\ c.qsort(@ptrCast(?*c_void, array[0..].ptr), c_ulong(array.len), @sizeOf(i32), compare_fn); + \\ c.qsort(@ptrCast(?*c_void, array[0..].ptr), @intCast(c_ulong, array.len), @sizeOf(i32), compare_fn); \\ \\ for (array) |item, i| { \\ if (item != i) {