zig fmt now intentionally respects all empty line comments

This commit is contained in:
Andrew Kelley
2021-02-23 14:30:21 -07:00
parent f041425e48
commit ca9259340d

View File

@@ -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(