forked from bytecodealliance/wasm-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
export.wast
48 lines (40 loc) · 1.01 KB
/
export.wast
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
;; test that "bundle of exports" works in `export` statements
;;
;; TODO: may want to confirm with the spec whether or not this is intended.
(component
(export "" (instance))
)
(assert_invalid
(component (export "" (instance 0)))
"index out of bounds")
(assert_invalid
(component (export "" (component 0)))
"index out of bounds")
(assert_invalid
(component (export "" (module 0)))
"index out of bounds")
(assert_invalid
(component (export "" (func 0)))
"index out of bounds")
(assert_invalid
(component (export "" (value 0)))
"index out of bounds")
(component
(import "1" (instance $i))
(import "2" (module $m))
(import "3" (component $c))
(import "4" (value $v string))
(import "5" (func $f))
(export "1" (instance $i))
(export "2" (module $m))
(export "3" (component $c))
(export "4" (value $v))
(export "5" (func $f))
)
(assert_invalid
(component
(import "" (value $v string))
(export "1" (value $v))
(export "2" (value $v))
)
"cannot be used more than once")