github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/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": 16, "action": {"type": "invoke", "field": "size", "args": []}, "expected": [{"type": "i32", "value": "0"}]}, 
     5    {"type": "assert_trap", "line": 17, "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": 18, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "text": "out of bounds table access", "expected": [{"type": "externref"}]}, 
     7    {"type": "assert_return", "line": 20, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}, {"type": "externref", "value": "null"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
     8    {"type": "assert_return", "line": 21, "action": {"type": "invoke", "field": "size", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 
     9    {"type": "assert_return", "line": 22, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "null"}]}, 
    10    {"type": "assert_return", "line": 23, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "0"}, {"type": "externref", "value": "2"}]}, "expected": []}, 
    11    {"type": "assert_return", "line": 24, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "2"}]}, 
    12    {"type": "assert_trap", "line": 25, "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": 26, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "1"}]}, "text": "out of bounds table access", "expected": [{"type": "externref"}]}, 
    14    {"type": "assert_return", "line": 28, "action": {"type": "invoke", "field": "grow-abbrev", "args": [{"type": "i32", "value": "4"}, {"type": "externref", "value": "3"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    15    {"type": "assert_return", "line": 29, "action": {"type": "invoke", "field": "size", "args": []}, "expected": [{"type": "i32", "value": "5"}]}, 
    16    {"type": "assert_return", "line": 30, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "2"}]}, 
    17    {"type": "assert_return", "line": 31, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "0"}, {"type": "externref", "value": "2"}]}, "expected": []}, 
    18    {"type": "assert_return", "line": 32, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "externref", "value": "2"}]}, 
    19    {"type": "assert_return", "line": 33, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "externref", "value": "3"}]}, 
    20    {"type": "assert_return", "line": 34, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "externref", "value": "3"}]}, 
    21    {"type": "assert_return", "line": 35, "action": {"type": "invoke", "field": "set", "args": [{"type": "i32", "value": "4"}, {"type": "externref", "value": "4"}]}, "expected": []}, 
    22    {"type": "assert_return", "line": 36, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "externref", "value": "4"}]}, 
    23    {"type": "assert_trap", "line": 37, "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": 38, "action": {"type": "invoke", "field": "get", "args": [{"type": "i32", "value": "5"}]}, "text": "out of bounds table access", "expected": [{"type": "externref"}]}, 
    25    {"type": "module", "line": 42, "filename": "table_grow.1.wasm"}, 
    26    {"type": "assert_return", "line": 50, "action": {"type": "invoke", "field": "grow", "args": []}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    27    {"type": "module", "line": 53, "filename": "table_grow.2.wasm"}, 
    28    {"type": "assert_return", "line": 60, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    29    {"type": "assert_return", "line": 61, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    30    {"type": "assert_return", "line": 62, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    31    {"type": "assert_return", "line": 63, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    32    {"type": "assert_return", "line": 64, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "800"}]}, "expected": [{"type": "i32", "value": "3"}]}, 
    33    {"type": "module", "line": 67, "filename": "table_grow.3.wasm"}, 
    34    {"type": "assert_return", "line": 74, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    35    {"type": "assert_return", "line": 75, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
    36    {"type": "assert_return", "line": 76, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "1"}]}, 
    37    {"type": "assert_return", "line": 77, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "2"}]}, 
    38    {"type": "assert_return", "line": 78, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    39    {"type": "assert_return", "line": 79, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "10"}]}, 
    40    {"type": "assert_return", "line": 80, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    41    {"type": "assert_return", "line": 81, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "65536"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
    42    {"type": "module", "line": 84, "filename": "table_grow.4.wasm"}, 
    43    {"type": "assert_return", "line": 106, "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": 107, "action": {"type": "invoke", "field": "grow", "args": [{"type": "i32", "value": "10"}]}, "expected": [{"type": "i32", "value": "10"}]}, 
    45    {"type": "assert_return", "line": 108, "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": 114, "filename": "table_grow.5.wasm", "text": "type mismatch", "module_type": "binary"}, 
    47    {"type": "assert_invalid", "line": 123, "filename": "table_grow.6.wasm", "text": "type mismatch", "module_type": "binary"}, 
    48    {"type": "assert_invalid", "line": 132, "filename": "table_grow.7.wasm", "text": "type mismatch", "module_type": "binary"}, 
    49    {"type": "assert_invalid", "line": 141, "filename": "table_grow.8.wasm", "text": "type mismatch", "module_type": "binary"}, 
    50    {"type": "assert_invalid", "line": 150, "filename": "table_grow.9.wasm", "text": "type mismatch", "module_type": "binary"}, 
    51    {"type": "assert_invalid", "line": 160, "filename": "table_grow.10.wasm", "text": "type mismatch", "module_type": "binary"}, 
    52    {"type": "assert_invalid", "line": 169, "filename": "table_grow.11.wasm", "text": "type mismatch", "module_type": "binary"}]}