commit ca9259340d42d92c8e44cb814effae447ee64a24 (tree) parent f041425e48b2f65fd4262d3c9ba210c410322d02 Author: Andrew Kelley <andrew@ziglang.org> Date: Tue, 23 Feb 2021 14:30:21 -0700 zig fmt now intentionally respects all empty line comments Diffstat:
| M | lib/std/zig/parser_test.zig | | | 24 | +++++++++--------------- |
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig @@ -3447,21 +3447,15 @@ test "zig fmt: file ends with struct field" { ); } -// TODO intentionally change the behavior of this case? -// for array literals we necessarily have meaningful empty comments -//test "zig fmt: comment after empty comment" { -// try testTransform( -// \\const x = true; // -// \\// -// \\// -// \\//a -// \\ -// , -// \\const x = true; -// \\//a -// \\ -// ); -//} +test "zig fmt: comment after empty comment" { + try testCanonical( + \\const x = true; // + \\// + \\// + \\//a + \\ + ); +} test "zig fmt: line comment in array" { try testTransform(