authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-02-23 19:40:34+01:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2021-02-23 19:40:34+01:00
logabfe21383035522945e52ffb3954c03398767a39
tree54622ce1a4251767c172132b00b2d2724d770839
parent6b9f19a6449b0fe5dce835590fcd6d13b5c785c4
signaturelock-open Commit is signed but in an unrecognized format.

zig fmt: enable array init trailing comment insertion test

Modify the test case slightly to match similar modifications done in 5820bd0 and 0f24b61.

1 files changed, 31 insertions(+), 30 deletions(-)

lib/std/zig/parser_test.zig+31-30
...@@ -3463,36 +3463,37 @@ test "zig fmt: file ends with struct field" {...@@ -3463,36 +3463,37 @@ test "zig fmt: file ends with struct field" {
3463// );3463// );
3464//}3464//}
34653465
3466//test "zig fmt: line comment in array" {3466test "zig fmt: line comment in array" {
3467// try testTransform(3467 try testTransform(
3468// \\test "a" {3468 \\test "a" {
3469// \\ var arr = [_]u32{3469 \\ var arr = [_]u32{
3470// \\ 03470 \\ 0
3471// \\ // 1,3471 \\ // 1,
3472// \\ // 2,3472 \\ // 2,
3473// \\ };3473 \\ };
3474// \\}3474 \\}
3475// \\3475 \\
3476// ,3476 ,
3477// \\test "a" {3477 \\test "a" {
3478// \\ var arr = [_]u32{3478 \\ var arr = [_]u32{
3479// \\ 0, // 1,3479 \\ 0,
3480// \\ // 2,3480 \\ // 1,
3481// \\ };3481 \\ // 2,
3482// \\}3482 \\ };
3483// \\3483 \\}
3484// );3484 \\
3485// try testCanonical(3485 );
3486// \\test "a" {3486 try testCanonical(
3487// \\ var arr = [_]u32{3487 \\test "a" {
3488// \\ 0,3488 \\ var arr = [_]u32{
3489// \\ // 1,3489 \\ 0,
3490// \\ // 2,3490 \\ // 1,
3491// \\ };3491 \\ // 2,
3492// \\}3492 \\ };
3493// \\3493 \\}
3494// );3494 \\
3495//}3495 );
3496}
34963497
3497test "zig fmt: comment after params" {3498test "zig fmt: comment after params" {
3498 try testTransform(3499 try testTransform(