From 05f304807f4d492bea0fa54c113e77ec9bb49f6d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 23 Feb 2021 18:48:01 -0700 Subject: [PATCH] zig fmt: add 3 more disabled failing test cases Found by running `zig fmt` on the std lib. --- lib/std/zig/parser_test.zig | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/lib/std/zig/parser_test.zig b/lib/std/zig/parser_test.zig index 951c437333..3f25b570c3 100644 --- a/lib/std/zig/parser_test.zig +++ b/lib/std/zig/parser_test.zig @@ -4164,6 +4164,46 @@ test "zig fmt: for loop with ptr payload and index" { ); } +// TODO +//test "zig fmt: proper indent line comment after multi-line single expr while loop" { +// try testCanonical( +// \\test { +// \\ while (a) : (b) +// \\ foo(); +// \\ +// \\ // bar +// \\ baz(); +// \\} +// \\ +// ); +//} + +// TODO +//test "zig fmt: respect extra newline between fn and pub usingnamespace" { +// try testCanonical( +// \\fn foo() void { +// \\ bar(); +// \\} +// \\ +// \\pub usingnamespace baz; +// \\ +// ); +//} + +// TODO +//test "zig fmt: respect extra newline between switch items" { +// try testCanonical( +// \\const a = switch (b) { +// \\ .c => {}, +// \\ +// \\ .d, +// \\ .e, +// \\ => f, +// \\}; +// \\ +// ); +//} + test "zig fmt: error for invalid bit range" { try testError( \\var x: []align(0:0:0)u8 = bar;