| 1 |
{ |
| 2 |
"source_filename": "tests/cli/function-references/call_ref/ref_as_non_null.wast", |
| 3 |
"commands": [ |
| 4 |
{ |
| 5 |
"type": "module", |
| 6 |
"line": 3, |
| 7 |
"filename": "ref_as_non_null.0.wasm", |
| 8 |
"module_type": "binary" |
| 9 |
}, |
| 10 |
{ |
| 11 |
"type": "assert_trap", |
| 12 |
"line": 27, |
| 13 |
"action": { |
| 14 |
"type": "invoke", |
| 15 |
"field": "unreachable", |
| 16 |
"args": [] |
| 17 |
}, |
| 18 |
"text": "unreachable" |
| 19 |
}, |
| 20 |
{ |
| 21 |
"type": "assert_trap", |
| 22 |
"line": 29, |
| 23 |
"action": { |
| 24 |
"type": "invoke", |
| 25 |
"field": "nullable-null", |
| 26 |
"args": [] |
| 27 |
}, |
| 28 |
"text": "null reference" |
| 29 |
}, |
| 30 |
{ |
| 31 |
"type": "assert_return", |
| 32 |
"line": 30, |
| 33 |
"action": { |
| 34 |
"type": "invoke", |
| 35 |
"field": "nonnullable-f", |
| 36 |
"args": [] |
| 37 |
}, |
| 38 |
"expected": [ |
| 39 |
{ |
| 40 |
"type": "i32", |
| 41 |
"value": "7" |
| 42 |
} |
| 43 |
] |
| 44 |
}, |
| 45 |
{ |
| 46 |
"type": "assert_return", |
| 47 |
"line": 31, |
| 48 |
"action": { |
| 49 |
"type": "invoke", |
| 50 |
"field": "nullable-f", |
| 51 |
"args": [] |
| 52 |
}, |
| 53 |
"expected": [ |
| 54 |
{ |
| 55 |
"type": "i32", |
| 56 |
"value": "7" |
| 57 |
} |
| 58 |
] |
| 59 |
}, |
| 60 |
{ |
| 61 |
"type": "assert_invalid", |
| 62 |
"line": 34, |
| 63 |
"filename": "ref_as_non_null.1.wasm", |
| 64 |
"module_type": "binary", |
| 65 |
"text": "type mismatch" |
| 66 |
}, |
| 67 |
{ |
| 68 |
"type": "module", |
| 69 |
"line": 43, |
| 70 |
"filename": "ref_as_non_null.2.wasm", |
| 71 |
"module_type": "binary" |
| 72 |
} |
| 73 |
] |
| 74 |
} |