Skip to content

Commit b3c7c78

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

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+
(component definition $C
2+
(core module $Memory (memory (export "mem") 1))
3+
(core instance $memory (instantiate $Memory))
4+
(core module $M
5+
(import "" "waitable-set.new" (func $waitable-set.new (result i32)))
6+
(import "" "waitable-set.wait" (func $waitable-set.wait (param i32 i32) (result i32)))
7+
(func $start
8+
(drop (call $waitable-set.wait (call $waitable-set.new) (i32.const 0)))
9+
)
10+
(start $start)
11+
)
12+
(canon waitable-set.new (core func $waitable-set.new))
13+
(canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
14+
(core instance $m (instantiate $M (with "" (instance
15+
(export "waitable-set.new" (func $waitable-set.new))
16+
(export "waitable-set.wait" (func $waitable-set.wait))
17+
))))
18+
)
19+
;; ideally we'd write (assert_trap (component instance $i $C)), but for now this test
20+
;; just exit with a trap, but not panic.
21+
(component instance $i $C)

0 commit comments

Comments
 (0)