update more tests

This commit is contained in:
Andrew Kelley 2018-06-17 12:33:24 -04:00
parent 3c12ba7180
commit 74ccf56a4b
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ const c = @cImport({
const msg = c"Hello, world!\n"; const msg = c"Hello, world!\n";
export fn main(argc: c_int, argv: **u8) c_int { 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; return 0;
} }

View File

@ -299,7 +299,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\export fn main() c_int { \\export fn main() c_int {
\\ var array = []u32{ 1, 7, 3, 2, 0, 9, 4, 8, 6, 5 }; \\ 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| { \\ for (array) |item, i| {
\\ if (item != i) { \\ if (item != i) {