| 1 |
;; RUN: wast % --assert default --snapshot tests/snapshots \ |
| 2 |
;; -f=cm-async,-cm-async-builtins |
| 3 |
|
| 4 |
(assert_invalid |
| 5 |
(component |
| 6 |
(core module $m (func (export "foo") (param i32))) |
| 7 |
(core instance $i (instantiate $m)) |
| 8 |
|
| 9 |
(func (export "foo") (param "p1" u32) (result u32) |
| 10 |
(canon lift (core func $i "foo") async) |
| 11 |
) |
| 12 |
) |
| 13 |
"requires the component model async stackful feature") |
| 14 |
|
| 15 |
;; waitable-set.wait cancellable |
| 16 |
(assert_invalid |
| 17 |
(component |
| 18 |
(core module $libc (memory (export "memory") 1)) |
| 19 |
(core instance $libc (instantiate $libc)) |
| 20 |
(core func (canon waitable-set.wait cancellable (memory $libc "memory"))) |
| 21 |
) |
| 22 |
"requires the component model async stackful feature") |
| 23 |
|
| 24 |
(component |
| 25 |
(core module $libc (memory (export "memory") 1)) |
| 26 |
(core instance $libc (instantiate $libc)) |
| 27 |
(core func (canon waitable-set.wait (memory $libc "memory"))) |
| 28 |
) |
| 29 |
|
| 30 |
;; waitable-set.poll cancellable |
| 31 |
(assert_invalid |
| 32 |
(component |
| 33 |
(core module $libc (memory (export "memory") 1)) |
| 34 |
(core instance $libc (instantiate $libc)) |
| 35 |
(core func (canon waitable-set.poll cancellable (memory $libc "memory"))) |
| 36 |
) |
| 37 |
"requires the component model async stackful feature") |
| 38 |
|
| 39 |
(component |
| 40 |
(core module $libc (memory (export "memory") 1)) |
| 41 |
(core instance $libc (instantiate $libc)) |
| 42 |
(core func (canon waitable-set.poll (memory $libc "memory"))) |
| 43 |
) |
| 44 |
|
| 45 |
;; thread.yield |
| 46 |
(assert_invalid |
| 47 |
(component (core func (canon thread.yield cancellable))) |
| 48 |
"requires the component model async stackful feature") |
| 49 |
|
| 50 |
(component (core func (canon thread.yield))) |