mirror of
https://github.com/ziglang/zig.git
synced 2026-01-28 02:05:31 +00:00
zig fmt: enable array init trailing comment insertion test
Modify the test case slightly to match similar modifications done in 5820bd0 and 0f24b61.
This commit is contained in:
parent
6b9f19a644
commit
abfe213830
@ -3463,36 +3463,37 @@ test "zig fmt: file ends with struct field" {
|
||||
// );
|
||||
//}
|
||||
|
||||
//test "zig fmt: line comment in array" {
|
||||
// try testTransform(
|
||||
// \\test "a" {
|
||||
// \\ var arr = [_]u32{
|
||||
// \\ 0
|
||||
// \\ // 1,
|
||||
// \\ // 2,
|
||||
// \\ };
|
||||
// \\}
|
||||
// \\
|
||||
// ,
|
||||
// \\test "a" {
|
||||
// \\ var arr = [_]u32{
|
||||
// \\ 0, // 1,
|
||||
// \\ // 2,
|
||||
// \\ };
|
||||
// \\}
|
||||
// \\
|
||||
// );
|
||||
// try testCanonical(
|
||||
// \\test "a" {
|
||||
// \\ var arr = [_]u32{
|
||||
// \\ 0,
|
||||
// \\ // 1,
|
||||
// \\ // 2,
|
||||
// \\ };
|
||||
// \\}
|
||||
// \\
|
||||
// );
|
||||
//}
|
||||
test "zig fmt: line comment in array" {
|
||||
try testTransform(
|
||||
\\test "a" {
|
||||
\\ var arr = [_]u32{
|
||||
\\ 0
|
||||
\\ // 1,
|
||||
\\ // 2,
|
||||
\\ };
|
||||
\\}
|
||||
\\
|
||||
,
|
||||
\\test "a" {
|
||||
\\ var arr = [_]u32{
|
||||
\\ 0,
|
||||
\\ // 1,
|
||||
\\ // 2,
|
||||
\\ };
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
try testCanonical(
|
||||
\\test "a" {
|
||||
\\ var arr = [_]u32{
|
||||
\\ 0,
|
||||
\\ // 1,
|
||||
\\ // 2,
|
||||
\\ };
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: comment after params" {
|
||||
try testTransform(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user