From 74ccf56a4b1da78b6cd6b0ac34dd6ded1e15b155 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 17 Jun 2018 12:33:24 -0400 Subject: [PATCH] update more tests --- example/hello_world/hello_libc.zig | 2 +- test/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 index f64beda40f..60a1f76871 100644 --- 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 index b60b844b1c..a18a78b419 100644 --- 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) {