| ... | ... | @@ -1,3 +1,23 @@ |
| 1 | // TODO: remove this after zig 0.11.0 is released |
| 2 | test "zig fmt: transform old for loop syntax to new" { |
| 3 | try testTransform( |
| 4 | \\fn foo() void { |
| 5 | \\ for (a) |b, i| { |
| 6 | \\ _ = b; _ = i; |
| 7 | \\ } |
| 8 | \\} |
| 9 | \\ |
| 10 | , |
| 11 | \\fn foo() void { |
| 12 | \\ for (a, 0..) |b, i| { |
| 13 | \\ _ = b; |
| 14 | \\ _ = i; |
| 15 | \\ } |
| 16 | \\} |
| 17 | \\ |
| 18 | ); |
| 19 | } |
| 20 | |
| 1 | 21 | test "zig fmt: tuple struct" { |
| 2 | 22 | try testCanonical( |
| 3 | 23 | \\const T = struct { |