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" {
22652265 \\}
22662266 \\
22672267 );
2268 try testCanonical(
2269 \\test "a" {
2270 \\ var arr = [_]u32{
2271 \\ 0,
2272 \\ // 1,
2273 \\ // 2,
2274 \\ };
2275 \\}
2276 \\
2277 );
22682278}
22692279
22702280test "zig fmt: comment after params" {
......@@ -2282,6 +2292,14 @@ test "zig fmt: comment after params" {
22822292 \\) void {}
22832293 \\
22842294 );
2295 try testCanonical(
2296 \\fn a(
2297 \\ b: u32,
2298 \\ // c: u32,
2299 \\ // d: u32,
2300 \\) void {}
2301 \\
2302 );
22852303}
22862304
22872305test "zig fmt: comment in array initializer/access" {