authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-16 10:11:53-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-16 10:11:53-04:00
log7874d5a40b5ab4bd94ffbf5ecf5935d707a28942
treea5d8b8e8b12e1f033bda5b44fd8f9f219a94200e
parent2151f84d59f8af6e28570cb01a3a134c7b068fa2
signaturelock-open Commit is signed but in an unrecognized format.

zig fmt: add more test cases


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

std/zig/parser_test.zig+12
......@@ -8,6 +8,18 @@ test "zig fmt: change use to usingnamespace" {
88 );
99}
1010
11test "zig fmt: async function" {
12 try testCanonical(
13 \\pub const Server = struct {
14 \\ handleRequestFn: async fn (*Server, *const std.net.Address, File) void,
15 \\};
16 \\test "hi" {
17 \\ var ptr = @ptrCast(async fn (i32) void, other);
18 \\}
19 \\
20 );
21}
22
1123test "zig fmt: whitespace fixes" {
1224 try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n",
1325 \\test "" {