diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-07-21 20:54:08 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-07-21 20:54:08 -0400 |
| commit | 11bd50f2b2a74ce25d841a15ba67d042d41b71c2 (patch) | |
| tree | 8221af0a57e853be09b7dea942ba2f44261f8270 /test | |
| parent | 78e03c466c6641571adef4bb3931d6cc6f425eb4 (diff) | |
| download | zig-11bd50f2b2a74ce25d841a15ba67d042d41b71c2.tar.gz zig-11bd50f2b2a74ce25d841a15ba67d042d41b71c2.zip | |
implement coroutine resume
Diffstat (limited to 'test')
| -rw-r--r-- | test/stage1/behavior/coroutines.zig | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/stage1/behavior/coroutines.zig b/test/stage1/behavior/coroutines.zig index cdab411fb1..fd07790e7f 100644 --- a/test/stage1/behavior/coroutines.zig +++ b/test/stage1/behavior/coroutines.zig @@ -4,9 +4,11 @@ const expect = std.testing.expect; var x: i32 = 1; -test "simple coroutine suspend" { +test "simple coroutine suspend and resume" { const p = async simpleAsyncFn(); expect(x == 2); + resume p; + expect(x == 3); } fn simpleAsyncFn() void { x += 1; |
