| ... | ... | @@ -10,6 +10,8 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 10 | 10 | \\ @cInclude("stdio.h"); |
| 11 | 11 | \\}); |
| 12 | 12 | \\pub export fn main(argc: c_int, argv: [*][*]u8) c_int { |
| 13 | \\ _ = argc; |
| 14 | \\ _ = argv; |
| 13 | 15 | \\ _ = c.puts("Hello, world!"); |
| 14 | 16 | \\ return 0; |
| 15 | 17 | \\} |
| ... | ... | @@ -143,6 +145,8 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 143 | 145 | \\}); |
| 144 | 146 | \\ |
| 145 | 147 | \\pub export fn main(argc: c_int, argv: [*][*]u8) c_int { |
| 148 | \\ _ = argc; |
| 149 | \\ _ = argv; |
| 146 | 150 | \\ if (is_windows) { |
| 147 | 151 | \\ // we want actual \n, not \r\n |
| 148 | 152 | \\ _ = c._setmode(1, c._O_BINARY); |
| ... | ... | @@ -265,8 +269,10 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 265 | 269 | \\const y : u16 = 5678; |
| 266 | 270 | \\pub fn main() void { |
| 267 | 271 | \\ var x_local : i32 = print_ok(x); |
| 272 | \\ _ = x_local; |
| 268 | 273 | \\} |
| 269 | 274 | \\fn print_ok(val: @TypeOf(x)) @TypeOf(foo) { |
| 275 | \\ _ = val; |
| 270 | 276 | \\ const stdout = io.getStdOut().writer(); |
| 271 | 277 | \\ stdout.print("OK\n", .{}) catch unreachable; |
| 272 | 278 | \\ return 0; |
| ... | ... | @@ -318,6 +324,8 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 318 | 324 | \\}); |
| 319 | 325 | \\ |
| 320 | 326 | \\pub export fn main(argc: c_int, argv: [*][*]u8) c_int { |
| 327 | \\ _ = argc; |
| 328 | \\ _ = argv; |
| 321 | 329 | \\ if (is_windows) { |
| 322 | 330 | \\ // we want actual \n, not \r\n |
| 323 | 331 | \\ _ = c._setmode(1, c._O_BINARY); |
| ... | ... | @@ -337,13 +345,19 @@ pub fn addCases(cases: *tests.CompareOutputContext) void { |
| 337 | 345 | \\const Foo = struct { |
| 338 | 346 | \\ field1: Bar, |
| 339 | 347 | \\ |
| 340 | | \\ fn method(a: *const Foo) bool { return true; } |
| 348 | \\ fn method(a: *const Foo) bool { |
| 349 | \\ _ = a; |
| 350 | \\ return true; |
| 351 | \\ } |
| 341 | 352 | \\}; |
| 342 | 353 | \\ |
| 343 | 354 | \\const Bar = struct { |
| 344 | 355 | \\ field2: i32, |
| 345 | 356 | \\ |
| 346 | | \\ fn method(b: *const Bar) bool { return true; } |
| 357 | \\ fn method(b: *const Bar) bool { |
| 358 | \\ _ = b; |
| 359 | \\ return true; |
| 360 | \\ } |
| 347 | 361 | \\}; |
| 348 | 362 | \\ |
| 349 | 363 | \\pub fn main() void { |