Skip to content

Commit 1213844

Browse files
committed
Add test/async/dont-block-start.wast
1 parent 2ed7a09 commit 1213844

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/async/dont-block-start.wast

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(assert_trap
2+
(component
3+
(core module $Memory (memory (export "mem") 1))
4+
(core instance $memory (instantiate $Memory))
5+
(core module $M
6+
(import "" "waitable-set.new" (func $waitable-set.new (result i32)))
7+
(import "" "waitable-set.wait" (func $waitable-set.wait (param i32 i32) (result i32)))
8+
(func $start
9+
(drop (call $waitable-set.wait (call $waitable-set.new) (i32.const 0)))
10+
)
11+
(start $start)
12+
)
13+
(canon waitable-set.new (core func $waitable-set.new))
14+
(canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
15+
(core instance $m (instantiate $M (with "" (instance
16+
(export "waitable-set.new" (func $waitable-set.new))
17+
(export "waitable-set.wait" (func $waitable-set.wait))
18+
))))
19+
)
20+
"cannot block a synchronous task before returning"
21+
)

0 commit comments

Comments
 (0)