diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-23 14:30:21 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-23 14:30:21 -0700 |
| commit | ca9259340d42d92c8e44cb814effae447ee64a24 (patch) | |
| tree | c730c3a8501f3ccadfba1859e1ac0cc0816d7557 /lib/std | |
| parent | f041425e48b2f65fd4262d3c9ba210c410322d02 (diff) | |
| download | zig-ca9259340d42d92c8e44cb814effae447ee64a24.tar.gz zig-ca9259340d42d92c8e44cb814effae447ee64a24.zip | |
zig fmt now intentionally respects all empty line comments
Diffstat (limited to 'lib/std')
| -rw-r--r-- | lib/std/zig/parser_test.zig | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig index 76d3985576..3fd7fbdb74 100644 --- 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( |
