wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v2/testdata/table_grow.json (about)

     1  {"source_filename": "./table_grow.wast",
     2   "commands": [
     3    {"type": "module", "line": 1, "filename": "table_grow.0.wasm"}, 
     4    {"type": "assert_return", "line": 13, "action": {"type": "invoke", "field": "size", "args": []}, "expected": [{"type": "i32", "value": "0"}]}, 
     5    {"type": "assert_trap", "line": 14, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "0"}, {"type": "externref", "value": "2"}]}, "text": "out of bounds table access", "expected": []}, 
     6    {"type": "assert_trap", "line": 15, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "text": "out of bounds table access", "expected": [{"type": "externref"}]}, 
     7    {"type": "assert_return", "line": 17, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}, {"type": "externref", "value": "null"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
     8    {"type": "assert_return", "line": 18, "action": {"type": "invoke", "field": "size", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 
     9    {"type": "assert_return", "line": 19, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "null"}]}, 
    10    {"type": "assert_return", "line": 20, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "0"}, {"type": "externref", "value": "2"}]}, "expected": []}, 
    11    {"type": "assert_return", "line": 21, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "2"}]}, 
    12    {"type": "assert_trap", "line": 22, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "1"}, {"type": "externref", "value": "2"}]}, "text": "out of bounds table access", "expected": []}, 
    13    {"type": "assert_trap", "line": 23, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "1"}]}, "text": "out of bounds table access", "expected": [{"type": "externref"}]}, 
    14    {"type": "assert_return", "line": 25, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "4"}, {"type": "externref", "value": "3"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    15    {"type": "assert_return", "line": 26, "action": {"type": "invoke", "field": "size", "args": []}, "expected": [{"type": "i32", "value": "5"}]}, 
    16    {"type": "assert_return", "line": 27, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "2"}]}, 
    17    {"type": "assert_return", "line": 28, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "0"}, {"type": "externref", "value": "2"}]}, "expected": []}, 
    18    {"type": "assert_return", "line": 29, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "2"}]}, 
    19    {"type": "assert_return", "line": 30, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "externref", "value": "3"}]}, 
    20    {"type": "assert_return", "line": 31, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "externref", "value": "3"}]}, 
    21    {"type": "assert_return", "line": 32, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "4"}, {"type": "externref", "value": "4"}]}, "expected": []}, 
    22    {"type": "assert_return", "line": 33, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "externref", "value": "4"}]}, 
    23    {"type": "assert_trap", "line": 34, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "5"}, {"type": "externref", "value": "2"}]}, "text": "out of bounds table access", "expected": []}, 
    24    {"type": "assert_trap", "line": 35, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "5"}]}, "text": "out of bounds table access", "expected": [{"type": "externref"}]}, 
    25    {"type": "module", "line": 39, "filename": "table_grow.1.wasm"}, 
    26    {"type": "assert_return", "line": 47, "action": {"type": "invoke", "field": "grow", "args": []}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    27    {"type": "module", "line": 50, "filename": "table_grow.2.wasm"}, 
    28    {"type": "assert_return", "line": 57, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    29    {"type": "assert_return", "line": 58, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    30    {"type": "assert_return", "line": 59, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    31    {"type": "assert_return", "line": 60, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    32    {"type": "assert_return", "line": 61, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "800"}]}, "expected": [{"type": "i32", "value": "3"}]}, 
    33    {"type": "module", "line": 64, "filename": "table_grow.3.wasm"}, 
    34    {"type": "assert_return", "line": 71, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    35    {"type": "assert_return", "line": 72, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    36    {"type": "assert_return", "line": 73, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    37    {"type": "assert_return", "line": 74, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "2"}]}, 
    38    {"type": "assert_return", "line": 75, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    39    {"type": "assert_return", "line": 76, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "10"}]}, 
    40    {"type": "assert_return", "line": 77, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    41    {"type": "assert_return", "line": 78, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "65536"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    42    {"type": "module", "line": 81, "filename": "table_grow.4.wasm"}, 
    43    {"type": "assert_return", "line": 103, "action": {"type": "invoke", "field": "check-table-null", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "9"}]}, "expected": [{"type": "funcref", "value": "null"}]}, 
    44    {"type": "assert_return", "line": 104, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "10"}]}, "expected": [{"type": "i32", "value": "10"}]}, 
    45    {"type": "assert_return", "line": 105, "action": {"type": "invoke", "field": "check-table-null", "args": [{"type": "i32", "value": "0"}, {"type": "i32", "value": "19"}]}, "expected": [{"type": "funcref", "value": "null"}]}, 
    46    {"type": "assert_invalid", "line": 111, "filename": "table_grow.5.wasm", "text": "type mismatch", "module_type": "binary"}, 
    47    {"type": "assert_invalid", "line": 120, "filename": "table_grow.6.wasm", "text": "type mismatch", "module_type": "binary"}, 
    48    {"type": "assert_invalid", "line": 129, "filename": "table_grow.7.wasm", "text": "type mismatch", "module_type": "binary"}, 
    49    {"type": "assert_invalid", "line": 138, "filename": "table_grow.8.wasm", "text": "type mismatch", "module_type": "binary"}, 
    50    {"type": "assert_invalid", "line": 147, "filename": "table_grow.9.wasm", "text": "type mismatch", "module_type": "binary"}, 
    51    {"type": "assert_invalid", "line": 157, "filename": "table_grow.10.wasm", "text": "type mismatch", "module_type": "binary"}, 
    52    {"type": "assert_invalid", "line": 166, "filename": "table_grow.11.wasm", "text": "type mismatch", "module_type": "binary"}]}