| ... | ... | @@ -5011,26 +5011,6 @@ test "zig fmt: coroutines" { |
| 5011 | 5011 | ); |
| 5012 | 5012 | } |
| 5013 | 5013 | |
| 5014 | | test "zig fmt: coroutines" { |
| 5015 | | try testCanonical( |
| 5016 | | \\async fn simpleAsyncFn() void { |
| 5017 | | \\ x += 1; |
| 5018 | | \\ suspend; |
| 5019 | | \\ x += 1; |
| 5020 | | \\ suspend |p| {} |
| 5021 | | \\ const p = async simpleAsyncFn() catch unreachable; |
| 5022 | | \\ await p; |
| 5023 | | \\} |
| 5024 | | \\ |
| 5025 | | \\test "coroutine suspend, resume, cancel" { |
| 5026 | | \\ const p = try async<std.debug.global_allocator> testAsyncSeq(); |
| 5027 | | \\ resume p; |
| 5028 | | \\ cancel p; |
| 5029 | | \\} |
| 5030 | | \\ |
| 5031 | | ); |
| 5032 | | } |
| 5033 | | |
| 5034 | 5014 | test "zig fmt: Block after if" { |
| 5035 | 5015 | try testCanonical( |
| 5036 | 5016 | \\test "Block after if" { |