authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-23 14:30:21-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-23 14:30:21-07:00
logca9259340d42d92c8e44cb814effae447ee64a24
treec730c3a8501f3ccadfba1859e1ac0cc0816d7557
parentf041425e48b2f65fd4262d3c9ba210c410322d02

zig fmt now intentionally respects all empty line comments


1 files changed, 9 insertions(+), 15 deletions(-)

lib/std/zig/parser_test.zig+9-15
...@@ -3447,21 +3447,15 @@ test "zig fmt: file ends with struct field" {...@@ -3447,21 +3447,15 @@ test "zig fmt: file ends with struct field" {
3447 );3447 );
3448}3448}
34493449
3450// TODO intentionally change the behavior of this case?3450test "zig fmt: comment after empty comment" {
3451// for array literals we necessarily have meaningful empty comments3451 try testCanonical(
3452//test "zig fmt: comment after empty comment" {3452 \\const x = true; //
3453// try testTransform(3453 \\//
3454// \\const x = true; //3454 \\//
3455// \\//3455 \\//a
3456// \\//3456 \\
3457// \\//a3457 );
3458// \\3458}
3459// ,
3460// \\const x = true;
3461// \\//a
3462// \\
3463// );
3464//}
34653459
3466test "zig fmt: line comment in array" {3460test "zig fmt: line comment in array" {
3467 try testTransform(3461 try testTransform(