Skip to content

Commit ab2b804

Browse files
authored
More changes to upstream tests (bytecodealliance#2337)
* More changes to upstream tests Some stragglers from Wasmtime discovered after bytecodealliance/wasmtime#11798. * Update test expectations
1 parent 467204b commit ab2b804

5 files changed

Lines changed: 210 additions & 199 deletions

File tree

tests/cli/component-model/resources.wast

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,17 @@
249249
)
250250

251251
(component
252-
(import "C" (component $C
253-
(export "T1" (type (sub resource)))
254-
(export "T2" (type $T2 (sub resource)))
255-
(export "T3" (type (eq $T2)))
256-
))
257-
(instance $c (instantiate $C))
258-
(alias export $c "T1" (type $T1))
259-
(alias export $c "T2" (type $T2))
260-
(alias export $c "T3" (type $T3))
252+
(component
253+
(import "C" (component $C
254+
(export "T1" (type (sub resource)))
255+
(export "T2" (type $T2 (sub resource)))
256+
(export "T3" (type (eq $T2)))
257+
))
258+
(instance $c (instantiate $C))
259+
(alias export $c "T1" (type $T1))
260+
(alias export $c "T2" (type $T2))
261+
(alias export $c "T3" (type $T3))
262+
)
261263
)
262264

263265
(component
@@ -299,42 +301,46 @@
299301
))
300302
)
301303

302-
(component $P
303-
(import "C1" (component $C1
304-
(import "T" (type $T (sub resource)))
305-
(export "foo" (func (param "t" (own $T))))
306-
))
307-
(import "C2" (component $C2
308-
(import "T" (type $T (sub resource)))
309-
(import "foo" (func (param "t" (own $T))))
310-
))
311-
(type $R (resource (rep i32)))
312-
(instance $c1 (instantiate $C1 (with "T" (type $R))))
313-
(instance $c2 (instantiate $C2
314-
(with "T" (type $R))
315-
(with "foo" (func $c1 "foo"))
316-
))
304+
(component
305+
(component $P
306+
(import "C1" (component $C1
307+
(import "T" (type $T (sub resource)))
308+
(export "foo" (func (param "t" (own $T))))
309+
))
310+
(import "C2" (component $C2
311+
(import "T" (type $T (sub resource)))
312+
(import "foo" (func (param "t" (own $T))))
313+
))
314+
(type $R (resource (rep i32)))
315+
(instance $c1 (instantiate $C1 (with "T" (type $R))))
316+
(instance $c2 (instantiate $C2
317+
(with "T" (type $R))
318+
(with "foo" (func $c1 "foo"))
319+
))
320+
)
317321
)
318322

319323
(component
320-
(import "C1" (component $C1
321-
(import "T1" (type $T1 (sub resource)))
322-
(import "T2" (type $T2 (sub resource)))
323-
(export "foo" (func (param "t" (tuple (own $T1) (own $T2)))))
324-
))
325-
(import "C2" (component $C2
326-
(import "T" (type $T (sub resource)))
327-
(export "foo" (func (param "t" (tuple (own $T) (own $T)))))
328-
))
329-
(type $R (resource (rep i32)))
330-
(instance $c1 (instantiate $C1
331-
(with "T1" (type $R))
332-
(with "T2" (type $R))
333-
))
334-
(instance $c2 (instantiate $C2
335-
(with "T" (type $R))
336-
(with "foo" (func $c1 "foo"))
337-
))
324+
(component
325+
(import "C1" (component $C1
326+
(import "T1" (type $T1 (sub resource)))
327+
(import "T2" (type $T2 (sub resource)))
328+
(export "foo" (func (param "t" (tuple (own $T1) (own $T2)))))
329+
))
330+
(import "C2" (component $C2
331+
(import "T" (type $T (sub resource)))
332+
(export "foo" (func (param "t" (tuple (own $T) (own $T)))))
333+
))
334+
(type $R (resource (rep i32)))
335+
(instance $c1 (instantiate $C1
336+
(with "T1" (type $R))
337+
(with "T2" (type $R))
338+
))
339+
(instance $c2 (instantiate $C2
340+
(with "T" (type $R))
341+
(with "foo" (func $c1 "foo"))
342+
))
343+
)
338344
)
339345

340346
(assert_invalid

0 commit comments

Comments
 (0)