| ... | ... | @@ -2265,6 +2265,16 @@ test "zig fmt: line comment in array" { |
| 2265 | 2265 | \\} |
| 2266 | 2266 | \\ |
| 2267 | 2267 | ); |
| 2268 | try testCanonical( |
| 2269 | \\test "a" { |
| 2270 | \\ var arr = [_]u32{ |
| 2271 | \\ 0, |
| 2272 | \\ // 1, |
| 2273 | \\ // 2, |
| 2274 | \\ }; |
| 2275 | \\} |
| 2276 | \\ |
| 2277 | ); |
| 2268 | 2278 | } |
| 2269 | 2279 | |
| 2270 | 2280 | test "zig fmt: comment after params" { |
| ... | ... | @@ -2282,6 +2292,14 @@ test "zig fmt: comment after params" { |
| 2282 | 2292 | \\) void {} |
| 2283 | 2293 | \\ |
| 2284 | 2294 | ); |
| 2295 | try testCanonical( |
| 2296 | \\fn a( |
| 2297 | \\ b: u32, |
| 2298 | \\ // c: u32, |
| 2299 | \\ // d: u32, |
| 2300 | \\) void {} |
| 2301 | \\ |
| 2302 | ); |
| 2285 | 2303 | } |
| 2286 | 2304 | |
| 2287 | 2305 | test "zig fmt: comment in array initializer/access" { |