authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-23 18:48:01-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-23 18:48:01-07:00
log05f304807f4d492bea0fa54c113e77ec9bb49f6d
treed597fb2dda24d3d6aa66e7aa64ced1a1a062679c
parent4420fe97bebbecfb595c8acad255c3f3747bcaef

zig fmt: add 3 more disabled failing test cases

Found by running `zig fmt` on the std lib.

1 files changed, 40 insertions(+), 0 deletions(-)

lib/std/zig/parser_test.zig+40
......@@ -4164,6 +4164,46 @@ test "zig fmt: for loop with ptr payload and index" {
41644164 );
41654165}
41664166
4167// TODO
4168//test "zig fmt: proper indent line comment after multi-line single expr while loop" {
4169// try testCanonical(
4170// \\test {
4171// \\ while (a) : (b)
4172// \\ foo();
4173// \\
4174// \\ // bar
4175// \\ baz();
4176// \\}
4177// \\
4178// );
4179//}
4180
4181// TODO
4182//test "zig fmt: respect extra newline between fn and pub usingnamespace" {
4183// try testCanonical(
4184// \\fn foo() void {
4185// \\ bar();
4186// \\}
4187// \\
4188// \\pub usingnamespace baz;
4189// \\
4190// );
4191//}
4192
4193// TODO
4194//test "zig fmt: respect extra newline between switch items" {
4195// try testCanonical(
4196// \\const a = switch (b) {
4197// \\ .c => {},
4198// \\
4199// \\ .d,
4200// \\ .e,
4201// \\ => f,
4202// \\};
4203// \\
4204// );
4205//}
4206
41674207test "zig fmt: error for invalid bit range" {
41684208 try testError(
41694209 \\var x: []align(0:0:0)u8 = bar;