update more tests
This commit is contained in:
parent
3c12ba7180
commit
74ccf56a4b
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user