mirror of
https://github.com/ziglang/zig.git
synced 2026-02-15 13:58:27 +00:00
added better test cases
This commit is contained in:
parent
22194efe68
commit
0063953d16
@ -2265,6 +2265,16 @@ test "zig fmt: line comment in array" {
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
try testCanonical(
|
||||
\\test "a" {
|
||||
\\ var arr = [_]u32{
|
||||
\\ 0,
|
||||
\\ // 1,
|
||||
\\ // 2,
|
||||
\\ };
|
||||
\\}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: comment after params" {
|
||||
@ -2282,6 +2292,14 @@ test "zig fmt: comment after params" {
|
||||
\\) void {}
|
||||
\\
|
||||
);
|
||||
try testCanonical(
|
||||
\\fn a(
|
||||
\\ b: u32,
|
||||
\\ // c: u32,
|
||||
\\ // d: u32,
|
||||
\\) void {}
|
||||
\\
|
||||
);
|
||||
}
|
||||
|
||||
test "zig fmt: comment in array initializer/access" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user