| ... | @@ -6,7 +6,7 @@ const tests = @import("tests.zig"); | ... | @@ -6,7 +6,7 @@ const tests = @import("tests.zig"); |
| 6 | pub fn addCases(cases: *tests.CompareOutputContext) void { | 6 | pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 7 | cases.addC("hello world with libc", | 7 | cases.addC("hello world with libc", |
| 8 | \\const c = @cImport(@cInclude("stdio.h")); | 8 | \\const c = @cImport(@cInclude("stdio.h")); |
| 9 | \\export fn main(argc: c_int, argv: [*][*]u8) c_int { | 9 | \\pub export fn main(argc: c_int, argv: [*][*]u8) c_int { |
| 10 | \\ _ = c.puts("Hello, world!"); | 10 | \\ _ = c.puts("Hello, world!"); |
| 11 | \\ return 0; | 11 | \\ return 0; |
| 12 | \\} | 12 | \\} |
| ... | @@ -139,7 +139,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { | ... | @@ -139,7 +139,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 139 | \\ @cInclude("stdio.h"); | 139 | \\ @cInclude("stdio.h"); |
| 140 | \\}); | 140 | \\}); |
| 141 | \\ | 141 | \\ |
| 142 | \\export fn main(argc: c_int, argv: [*][*]u8) c_int { | 142 | \\pub export fn main(argc: c_int, argv: [*][*]u8) c_int { |
| 143 | \\ if (is_windows) { | 143 | \\ if (is_windows) { |
| 144 | \\ // we want actual \n, not \r\n | 144 | \\ // we want actual \n, not \r\n |
| 145 | \\ _ = c._setmode(1, c._O_BINARY); | 145 | \\ _ = c._setmode(1, c._O_BINARY); |
| ... | @@ -286,7 +286,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { | ... | @@ -286,7 +286,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 286 | \\ } | 286 | \\ } |
| 287 | \\} | 287 | \\} |
| 288 | \\ | 288 | \\ |
| 289 | \\export fn main() c_int { | 289 | \\pub export fn main() c_int { |
| 290 | \\ var array = [_]u32{ 1, 7, 3, 2, 0, 9, 4, 8, 6, 5 }; | 290 | \\ var array = [_]u32{ 1, 7, 3, 2, 0, 9, 4, 8, 6, 5 }; |
| 291 | \\ | 291 | \\ |
| 292 | \\ c.qsort(@ptrCast(?*c_void, array[0..].ptr), @intCast(c_ulong, array.len), @sizeOf(i32), compare_fn); | 292 | \\ c.qsort(@ptrCast(?*c_void, array[0..].ptr), @intCast(c_ulong, array.len), @sizeOf(i32), compare_fn); |
| ... | @@ -314,7 +314,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { | ... | @@ -314,7 +314,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 314 | \\ @cInclude("stdio.h"); | 314 | \\ @cInclude("stdio.h"); |
| 315 | \\}); | 315 | \\}); |
| 316 | \\ | 316 | \\ |
| 317 | \\export fn main(argc: c_int, argv: [*][*]u8) c_int { | 317 | \\pub export fn main(argc: c_int, argv: [*][*]u8) c_int { |
| 318 | \\ if (is_windows) { | 318 | \\ if (is_windows) { |
| 319 | \\ // we want actual \n, not \r\n | 319 | \\ // we want actual \n, not \r\n |
| 320 | \\ _ = c._setmode(1, c._O_BINARY); | 320 | \\ _ = c._setmode(1, c._O_BINARY); |