| 1 |
;; RUN: wast --assert default --snapshot tests/snapshots % |
| 2 |
|
| 3 |
(assert_invalid |
| 4 |
(component |
| 5 |
(core module $A |
| 6 |
(import "" "" (memory 1))) |
| 7 |
(core module $B |
| 8 |
(memory (export "") i64 1)) |
| 9 |
(core instance $b (instantiate $B)) |
| 10 |
(core instance $a (instantiate $A (with "" (instance $b)))) |
| 11 |
) |
| 12 |
"mismatch in index type used for memories") |
| 13 |
|
| 14 |
(assert_invalid |
| 15 |
(component |
| 16 |
(core module $A |
| 17 |
(import "" "" (memory i64 1))) |
| 18 |
(core module $B |
| 19 |
(memory (export "") 1)) |
| 20 |
(core instance $b (instantiate $B)) |
| 21 |
(core instance $a (instantiate $A (with "" (instance $b)))) |
| 22 |
) |
| 23 |
"mismatch in index type used for memories") |
| 24 |
|
| 25 |
(component |
| 26 |
(core module $A |
| 27 |
(memory (export "m") i64 1)) |
| 28 |
(core instance $A (instantiate $A)) |
| 29 |
(alias core export $A "m" (core memory $m)) |
| 30 |
|
| 31 |
(core module $B (import "" "" (memory i64 1))) |
| 32 |
(core instance (instantiate $B (with "" (instance (export "" (memory $m)))))) |
| 33 |
) |
| 34 |
|
| 35 |
(component |
| 36 |
(core module $A |
| 37 |
(table (export "m") i64 1 funcref)) |
| 38 |
(core instance $A (instantiate $A)) |
| 39 |
(alias core export $A "m" (core table $m)) |
| 40 |
|
| 41 |
(core module $B (import "" "" (table i64 1 funcref))) |
| 42 |
(core instance (instantiate $B (with "" (instance (export "" (table $m)))))) |
| 43 |
) |
| 44 |
|
| 45 |
(assert_invalid |
| 46 |
(component |
| 47 |
(import "x" (func $x (param "x" string))) |
| 48 |
(core module $A |
| 49 |
(memory (export "m") i64 1)) |
| 50 |
(core instance $A (instantiate $A)) |
| 51 |
(alias core export $A "m" (core memory $m)) |
| 52 |
(core func (canon lower (func $x) (memory $m))) |
| 53 |
) |
| 54 |
"canonical ABI memory is not a 32-bit linear memory") |