| ... | ... | @@ -3727,24 +3727,24 @@ test "zig fmt: Don't add extra newline after if" { |
| 3727 | 3727 | ); |
| 3728 | 3728 | } |
| 3729 | 3729 | |
| 3730 | | //test "zig fmt: comments in ternary ifs" { |
| 3731 | | // try testCanonical( |
| 3732 | | // \\const x = if (true) { |
| 3733 | | // \\ 1; |
| 3734 | | // \\} else if (false) |
| 3735 | | // \\ // Comment |
| 3736 | | // \\ 0; |
| 3737 | | // \\const y = if (true) |
| 3738 | | // \\ // Comment |
| 3739 | | // \\ 1 |
| 3740 | | // \\else |
| 3741 | | // \\ 0; |
| 3742 | | // \\ |
| 3743 | | // \\pub extern "c" fn printf(format: [*:0]const u8, ...) c_int; |
| 3744 | | // \\ |
| 3745 | | // ); |
| 3746 | | //} |
| 3747 | | // |
| 3730 | test "zig fmt: comments in ternary ifs" { |
| 3731 | try testCanonical( |
| 3732 | \\const x = if (true) { |
| 3733 | \\ 1; |
| 3734 | \\} else if (false) |
| 3735 | \\ // Comment |
| 3736 | \\ 0; |
| 3737 | \\const y = if (true) |
| 3738 | \\ // Comment |
| 3739 | \\ 1 |
| 3740 | \\else |
| 3741 | \\ 0; |
| 3742 | \\ |
| 3743 | \\pub extern "c" fn printf(format: [*:0]const u8, ...) c_int; |
| 3744 | \\ |
| 3745 | ); |
| 3746 | } |
| 3747 | |
| 3748 | 3748 | //test "zig fmt: test comments in field access chain" { |
| 3749 | 3749 | // try testCanonical( |
| 3750 | 3750 | // \\pub const str = struct { |