Skip to content

Commit 51a029c

Browse files
committed
Update simple test case to merge an instance.
1 parent 357107d commit 51a029c

3 files changed

Lines changed: 23 additions & 5 deletions

File tree

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
(component
22
(import "e" (func))
33
(import "i2" (instance))
4-
(import "merged" (instance))
4+
(import "merged" (instance
5+
(export "a" (func))
6+
))
57
(export "e" (func 0))
68
)

crates/wac-graph/tests/graphs/simple/encoded.wat

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44
)
55
(import "i1" (instance (;0;) (type 0)))
66
(type (;1;)
7-
(instance)
7+
(instance
8+
(type (;0;) (func))
9+
(export (;0;) "a" (func (type 0)))
10+
(type (;1;) (func))
11+
(export (;1;) "b" (func (type 1)))
12+
)
813
)
914
(import "merged" (instance (;1;) (type 1)))
1015
(type (;2;)
@@ -22,7 +27,12 @@
2227
)
2328
(import "i1" (instance (;0;) (type 2)))
2429
(type (;3;)
25-
(instance)
30+
(instance
31+
(type (;0;) (func))
32+
(export (;0;) "a" (func (type 0)))
33+
(type (;1;) (func))
34+
(export (;1;) "b" (func (type 1)))
35+
)
2636
)
2737
(import "merged" (instance (;1;) (type 3)))
2838
(export (;1;) "bar" (func 0))
@@ -43,7 +53,10 @@
4353
)
4454
(import "i2" (instance (;0;) (type 1)))
4555
(type (;2;)
46-
(instance)
56+
(instance
57+
(type (;0;) (func))
58+
(export (;0;) "a" (func (type 0)))
59+
)
4760
)
4861
(import "merged" (instance (;1;) (type 2)))
4962
(export (;1;) "e" (func 0))

crates/wac-graph/tests/graphs/simple/foo.wat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
(type (export "f") (func))
33
(import "foo" (func))
44
(import "i1" (instance))
5-
(import "merged" (instance))
5+
(import "merged" (instance
6+
(export "a" (func))
7+
(export "b" (func))
8+
))
69
(export "bar" (func 0))
710
)

0 commit comments

Comments
 (0)