authorgravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-06-27 00:30:34+03:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2019-06-27 00:30:34+03:00
log0063953d1634ce770ce88519c66e3956832ceb7e
treededb3fef106490e6f2f99843322ee05975ebf3b3
parent22194efe68a112d6d0688f49bf6340a8a952d47c
signaturelock-open Commit is signed but in an unrecognized format.

added better test cases


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

std/zig/parser_test.zig+18
...@@ -2265,6 +2265,16 @@ test "zig fmt: line comment in array" {...@@ -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}
22692279
2270test "zig fmt: comment after params" {2280test "zig fmt: comment after params" {
...@@ -2282,6 +2292,14 @@ test "zig fmt: comment after params" {...@@ -2282,6 +2292,14 @@ test "zig fmt: comment after params" {
2282 \\) void {}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}
22862304
2287test "zig fmt: comment in array initializer/access" {2305test "zig fmt: comment in array initializer/access" {