mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 05:20:34 +00:00
zig fmt: add more test cases
This commit is contained in:
parent
2151f84d59
commit
7874d5a40b
@ -8,6 +8,18 @@ test "zig fmt: change use to usingnamespace" {
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: async function" {
|
||||
try testCanonical(
|
||||
\\pub const Server = struct {
|
||||
\\ handleRequestFn: async fn (*Server, *const std.net.Address, File) void,
|
||||
\\};
|
||||
\\test "hi" {
|
||||
\\ var ptr = @ptrCast(async fn (i32) void, other);
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: whitespace fixes" {
|
||||
try testTransform("test \"\" {\r\n\tconst hi = x;\r\n}\n// zig fmt: off\ntest \"\"{\r\n\tconst a = b;}\r\n",
|
||||
\\test "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user