github.com/wasilibs/wazerox@v0.0.0-20240124024944-4923be63ab5f/internal/integration_test/spectest/v2/testdata/call.json (about) 1 {"source_filename": "./call.wast", 2 "commands": [ 3 {"type": "module", "line": 3, "filename": "call.0.wasm"}, 4 {"type": "assert_return", "line": 285, "action": {"type": "invoke", "field": "type-i32", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 5 {"type": "assert_return", "line": 286, "action": {"type": "invoke", "field": "type-i64", "args": []}, "expected": [{"type": "i64", "value": "356"}]}, 6 {"type": "assert_return", "line": 287, "action": {"type": "invoke", "field": "type-f32", "args": []}, "expected": [{"type": "f32", "value": "1165172736"}]}, 7 {"type": "assert_return", "line": 288, "action": {"type": "invoke", "field": "type-f64", "args": []}, "expected": [{"type": "f64", "value": "4660882566700597248"}]}, 8 {"type": "assert_return", "line": 289, "action": {"type": "invoke", "field": "type-i32-i64", "args": []}, "expected": [{"type": "i32", "value": "306"}, {"type": "i64", "value": "356"}]}, 9 {"type": "assert_return", "line": 291, "action": {"type": "invoke", "field": "type-first-i32", "args": []}, "expected": [{"type": "i32", "value": "32"}]}, 10 {"type": "assert_return", "line": 292, "action": {"type": "invoke", "field": "type-first-i64", "args": []}, "expected": [{"type": "i64", "value": "64"}]}, 11 {"type": "assert_return", "line": 293, "action": {"type": "invoke", "field": "type-first-f32", "args": []}, "expected": [{"type": "f32", "value": "1068037571"}]}, 12 {"type": "assert_return", "line": 294, "action": {"type": "invoke", "field": "type-first-f64", "args": []}, "expected": [{"type": "f64", "value": "4610064722561534525"}]}, 13 {"type": "assert_return", "line": 296, "action": {"type": "invoke", "field": "type-second-i32", "args": []}, "expected": [{"type": "i32", "value": "32"}]}, 14 {"type": "assert_return", "line": 297, "action": {"type": "invoke", "field": "type-second-i64", "args": []}, "expected": [{"type": "i64", "value": "64"}]}, 15 {"type": "assert_return", "line": 298, "action": {"type": "invoke", "field": "type-second-f32", "args": []}, "expected": [{"type": "f32", "value": "1107296256"}]}, 16 {"type": "assert_return", "line": 299, "action": {"type": "invoke", "field": "type-second-f64", "args": []}, "expected": [{"type": "f64", "value": "4634211053438658150"}]}, 17 {"type": "assert_return", "line": 301, "action": {"type": "invoke", "field": "type-all-i32-f64", "args": []}, "expected": [{"type": "i32", "value": "32"}, {"type": "f64", "value": "4610064722561534525"}]}, 18 {"type": "assert_return", "line": 302, "action": {"type": "invoke", "field": "type-all-i32-i32", "args": []}, "expected": [{"type": "i32", "value": "2"}, {"type": "i32", "value": "1"}]}, 19 {"type": "assert_return", "line": 303, "action": {"type": "invoke", "field": "type-all-f32-f64", "args": []}, "expected": [{"type": "f64", "value": "4611686018427387904"}, {"type": "f32", "value": "1065353216"}]}, 20 {"type": "assert_return", "line": 304, "action": {"type": "invoke", "field": "type-all-f64-i32", "args": []}, "expected": [{"type": "i32", "value": "2"}, {"type": "f64", "value": "4607182418800017408"}]}, 21 {"type": "assert_return", "line": 306, "action": {"type": "invoke", "field": "as-binary-all-operands", "args": []}, "expected": [{"type": "i32", "value": "7"}]}, 22 {"type": "assert_return", "line": 307, "action": {"type": "invoke", "field": "as-mixed-operands", "args": []}, "expected": [{"type": "i32", "value": "32"}]}, 23 {"type": "assert_return", "line": 308, "action": {"type": "invoke", "field": "as-call-all-operands", "args": []}, "expected": [{"type": "i32", "value": "3"}, {"type": "i32", "value": "4"}]}, 24 {"type": "assert_return", "line": 310, "action": {"type": "invoke", "field": "fac", "args": [{"type": "i64", "value": "0"}]}, "expected": [{"type": "i64", "value": "1"}]}, 25 {"type": "assert_return", "line": 311, "action": {"type": "invoke", "field": "fac", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "1"}]}, 26 {"type": "assert_return", "line": 312, "action": {"type": "invoke", "field": "fac", "args": [{"type": "i64", "value": "5"}]}, "expected": [{"type": "i64", "value": "120"}]}, 27 {"type": "assert_return", "line": 313, "action": {"type": "invoke", "field": "fac", "args": [{"type": "i64", "value": "25"}]}, "expected": [{"type": "i64", "value": "7034535277573963776"}]}, 28 {"type": "assert_return", "line": 314, "action": {"type": "invoke", "field": "fac-acc", "args": [{"type": "i64", "value": "0"}, {"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "1"}]}, 29 {"type": "assert_return", "line": 315, "action": {"type": "invoke", "field": "fac-acc", "args": [{"type": "i64", "value": "1"}, {"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "1"}]}, 30 {"type": "assert_return", "line": 316, "action": {"type": "invoke", "field": "fac-acc", "args": [{"type": "i64", "value": "5"}, {"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "120"}]}, 31 {"type": "assert_return", "line": 318, "action": {"type": "invoke", "field": "fac-acc", "args": [{"type": "i64", "value": "25"}, {"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "7034535277573963776"}]}, 32 {"type": "assert_return", "line": 322, "action": {"type": "invoke", "field": "fib", "args": [{"type": "i64", "value": "0"}]}, "expected": [{"type": "i64", "value": "1"}]}, 33 {"type": "assert_return", "line": 323, "action": {"type": "invoke", "field": "fib", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "1"}]}, 34 {"type": "assert_return", "line": 324, "action": {"type": "invoke", "field": "fib", "args": [{"type": "i64", "value": "2"}]}, "expected": [{"type": "i64", "value": "2"}]}, 35 {"type": "assert_return", "line": 325, "action": {"type": "invoke", "field": "fib", "args": [{"type": "i64", "value": "5"}]}, "expected": [{"type": "i64", "value": "8"}]}, 36 {"type": "assert_return", "line": 326, "action": {"type": "invoke", "field": "fib", "args": [{"type": "i64", "value": "20"}]}, "expected": [{"type": "i64", "value": "10946"}]}, 37 {"type": "assert_return", "line": 328, "action": {"type": "invoke", "field": "even", "args": [{"type": "i64", "value": "0"}]}, "expected": [{"type": "i32", "value": "44"}]}, 38 {"type": "assert_return", "line": 329, "action": {"type": "invoke", "field": "even", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i32", "value": "99"}]}, 39 {"type": "assert_return", "line": 330, "action": {"type": "invoke", "field": "even", "args": [{"type": "i64", "value": "100"}]}, "expected": [{"type": "i32", "value": "44"}]}, 40 {"type": "assert_return", "line": 331, "action": {"type": "invoke", "field": "even", "args": [{"type": "i64", "value": "77"}]}, "expected": [{"type": "i32", "value": "99"}]}, 41 {"type": "assert_return", "line": 332, "action": {"type": "invoke", "field": "odd", "args": [{"type": "i64", "value": "0"}]}, "expected": [{"type": "i32", "value": "99"}]}, 42 {"type": "assert_return", "line": 333, "action": {"type": "invoke", "field": "odd", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i32", "value": "44"}]}, 43 {"type": "assert_return", "line": 334, "action": {"type": "invoke", "field": "odd", "args": [{"type": "i64", "value": "200"}]}, "expected": [{"type": "i32", "value": "99"}]}, 44 {"type": "assert_return", "line": 335, "action": {"type": "invoke", "field": "odd", "args": [{"type": "i64", "value": "77"}]}, "expected": [{"type": "i32", "value": "44"}]}, 45 {"type": "assert_exhaustion", "line": 337, "action": {"type": "invoke", "field": "runaway", "args": []}, "text": "call stack exhausted", "expected": []}, 46 {"type": "assert_exhaustion", "line": 338, "action": {"type": "invoke", "field": "mutual-runaway", "args": []}, "text": "call stack exhausted", "expected": []}, 47 {"type": "assert_return", "line": 340, "action": {"type": "invoke", "field": "as-select-first", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 48 {"type": "assert_return", "line": 341, "action": {"type": "invoke", "field": "as-select-mid", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 49 {"type": "assert_return", "line": 342, "action": {"type": "invoke", "field": "as-select-last", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 50 {"type": "assert_return", "line": 344, "action": {"type": "invoke", "field": "as-if-condition", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 51 {"type": "assert_return", "line": 346, "action": {"type": "invoke", "field": "as-br_if-first", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 52 {"type": "assert_return", "line": 347, "action": {"type": "invoke", "field": "as-br_if-last", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 53 {"type": "assert_return", "line": 349, "action": {"type": "invoke", "field": "as-br_table-first", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 54 {"type": "assert_return", "line": 350, "action": {"type": "invoke", "field": "as-br_table-last", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 55 {"type": "assert_return", "line": 352, "action": {"type": "invoke", "field": "as-call_indirect-first", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 56 {"type": "assert_return", "line": 353, "action": {"type": "invoke", "field": "as-call_indirect-mid", "args": []}, "expected": [{"type": "i32", "value": "2"}]}, 57 {"type": "assert_trap", "line": 354, "action": {"type": "invoke", "field": "as-call_indirect-last", "args": []}, "text": "undefined element", "expected": [{"type": "i32"}]}, 58 {"type": "assert_return", "line": 356, "action": {"type": "invoke", "field": "as-store-first", "args": []}, "expected": []}, 59 {"type": "assert_return", "line": 357, "action": {"type": "invoke", "field": "as-store-last", "args": []}, "expected": []}, 60 {"type": "assert_return", "line": 359, "action": {"type": "invoke", "field": "as-memory.grow-value", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 61 {"type": "assert_return", "line": 360, "action": {"type": "invoke", "field": "as-return-value", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 62 {"type": "assert_return", "line": 361, "action": {"type": "invoke", "field": "as-drop-operand", "args": []}, "expected": []}, 63 {"type": "assert_return", "line": 362, "action": {"type": "invoke", "field": "as-br-value", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 64 {"type": "assert_return", "line": 363, "action": {"type": "invoke", "field": "as-local.set-value", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 65 {"type": "assert_return", "line": 364, "action": {"type": "invoke", "field": "as-local.tee-value", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 66 {"type": "assert_return", "line": 365, "action": {"type": "invoke", "field": "as-global.set-value", "args": []}, "expected": [{"type": "i32", "value": "306"}]}, 67 {"type": "assert_return", "line": 366, "action": {"type": "invoke", "field": "as-load-operand", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 68 {"type": "assert_return", "line": 368, "action": {"type": "invoke", "field": "as-unary-operand", "args": []}, "expected": [{"type": "f32", "value": "0"}]}, 69 {"type": "assert_return", "line": 369, "action": {"type": "invoke", "field": "as-binary-left", "args": []}, "expected": [{"type": "i32", "value": "11"}]}, 70 {"type": "assert_return", "line": 370, "action": {"type": "invoke", "field": "as-binary-right", "args": []}, "expected": [{"type": "i32", "value": "9"}]}, 71 {"type": "assert_return", "line": 371, "action": {"type": "invoke", "field": "as-test-operand", "args": []}, "expected": [{"type": "i32", "value": "0"}]}, 72 {"type": "assert_return", "line": 372, "action": {"type": "invoke", "field": "as-compare-left", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 73 {"type": "assert_return", "line": 373, "action": {"type": "invoke", "field": "as-compare-right", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 74 {"type": "assert_return", "line": 374, "action": {"type": "invoke", "field": "as-convert-operand", "args": []}, "expected": [{"type": "i64", "value": "1"}]}, 75 {"type": "assert_return", "line": 376, "action": {"type": "invoke", "field": "return-from-long-argument-list", "args": [{"type": "i32", "value": "42"}]}, "expected": [{"type": "i32", "value": "42"}]}, 76 {"type": "assert_invalid", "line": 381, "filename": "call.1.wasm", "text": "type mismatch", "module_type": "binary"}, 77 {"type": "assert_invalid", "line": 388, "filename": "call.2.wasm", "text": "type mismatch", "module_type": "binary"}, 78 {"type": "assert_invalid", "line": 396, "filename": "call.3.wasm", "text": "type mismatch", "module_type": "binary"}, 79 {"type": "assert_invalid", "line": 403, "filename": "call.4.wasm", "text": "type mismatch", "module_type": "binary"}, 80 {"type": "assert_invalid", "line": 410, "filename": "call.5.wasm", "text": "type mismatch", "module_type": "binary"}, 81 {"type": "assert_invalid", "line": 417, "filename": "call.6.wasm", "text": "type mismatch", "module_type": "binary"}, 82 {"type": "assert_invalid", "line": 425, "filename": "call.7.wasm", "text": "type mismatch", "module_type": "binary"}, 83 {"type": "assert_invalid", "line": 432, "filename": "call.8.wasm", "text": "type mismatch", "module_type": "binary"}, 84 {"type": "assert_invalid", "line": 439, "filename": "call.9.wasm", "text": "type mismatch", "module_type": "binary"}, 85 {"type": "assert_invalid", "line": 446, "filename": "call.10.wasm", "text": "type mismatch", "module_type": "binary"}, 86 {"type": "assert_invalid", "line": 454, "filename": "call.11.wasm", "text": "type mismatch", "module_type": "binary"}, 87 {"type": "assert_invalid", "line": 463, "filename": "call.12.wasm", "text": "type mismatch", "module_type": "binary"}, 88 {"type": "assert_invalid", "line": 472, "filename": "call.13.wasm", "text": "type mismatch", "module_type": "binary"}, 89 {"type": "assert_invalid", "line": 481, "filename": "call.14.wasm", "text": "type mismatch", "module_type": "binary"}, 90 {"type": "assert_invalid", "line": 490, "filename": "call.15.wasm", "text": "type mismatch", "module_type": "binary"}, 91 {"type": "assert_invalid", "line": 499, "filename": "call.16.wasm", "text": "type mismatch", "module_type": "binary"}, 92 {"type": "assert_invalid", "line": 512, "filename": "call.17.wasm", "text": "unknown function", "module_type": "binary"}, 93 {"type": "assert_invalid", "line": 516, "filename": "call.18.wasm", "text": "unknown function", "module_type": "binary"}]}