github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/integration_test/spectest/v2/testdata/switch.json (about)

     1  {"source_filename": "./switch.wast",
     2   "commands": [
     3    {"type": "module", "line": 1, "filename": "switch.0.wasm"}, 
     4    {"type": "assert_return", "line": 120, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "0"}]}, 
     5    {"type": "assert_return", "line": 121, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "4294967295"}]}, 
     6    {"type": "assert_return", "line": 122, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4294967294"}]}, 
     7    {"type": "assert_return", "line": 123, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "4294967293"}]}, 
     8    {"type": "assert_return", "line": 124, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "i32", "value": "100"}]}, 
     9    {"type": "assert_return", "line": 125, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "5"}]}, "expected": [{"type": "i32", "value": "101"}]}, 
    10    {"type": "assert_return", "line": 126, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "102"}]}, 
    11    {"type": "assert_return", "line": 127, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "7"}]}, "expected": [{"type": "i32", "value": "100"}]}, 
    12    {"type": "assert_return", "line": 128, "action": {"type": "invoke", "field": "stmt", "args": [{"type": "i32", "value": "4294967286"}]}, "expected": [{"type": "i32", "value": "102"}]}, 
    13    {"type": "assert_return", "line": 130, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "0"}]}, "expected": [{"type": "i64", "value": "0"}]}, 
    14    {"type": "assert_return", "line": 131, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "1"}]}, "expected": [{"type": "i64", "value": "18446744073709551615"}]}, 
    15    {"type": "assert_return", "line": 132, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "2"}]}, "expected": [{"type": "i64", "value": "18446744073709551614"}]}, 
    16    {"type": "assert_return", "line": 133, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "3"}]}, "expected": [{"type": "i64", "value": "18446744073709551613"}]}, 
    17    {"type": "assert_return", "line": 134, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "6"}]}, "expected": [{"type": "i64", "value": "101"}]}, 
    18    {"type": "assert_return", "line": 135, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "7"}]}, "expected": [{"type": "i64", "value": "18446744073709551611"}]}, 
    19    {"type": "assert_return", "line": 136, "action": {"type": "invoke", "field": "expr", "args": [{"type": "i64", "value": "18446744073709551606"}]}, "expected": [{"type": "i64", "value": "100"}]}, 
    20    {"type": "assert_return", "line": 138, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "0"}]}, "expected": [{"type": "i32", "value": "110"}]}, 
    21    {"type": "assert_return", "line": 139, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "1"}]}, "expected": [{"type": "i32", "value": "12"}]}, 
    22    {"type": "assert_return", "line": 140, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "2"}]}, "expected": [{"type": "i32", "value": "4"}]}, 
    23    {"type": "assert_return", "line": 141, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "3"}]}, "expected": [{"type": "i32", "value": "1116"}]}, 
    24    {"type": "assert_return", "line": 142, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "4"}]}, "expected": [{"type": "i32", "value": "118"}]}, 
    25    {"type": "assert_return", "line": 143, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "5"}]}, "expected": [{"type": "i32", "value": "20"}]}, 
    26    {"type": "assert_return", "line": 144, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "6"}]}, "expected": [{"type": "i32", "value": "12"}]}, 
    27    {"type": "assert_return", "line": 145, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "7"}]}, "expected": [{"type": "i32", "value": "1124"}]}, 
    28    {"type": "assert_return", "line": 146, "action": {"type": "invoke", "field": "arg", "args": [{"type": "i32", "value": "8"}]}, "expected": [{"type": "i32", "value": "126"}]}, 
    29    {"type": "assert_return", "line": 148, "action": {"type": "invoke", "field": "corner", "args": []}, "expected": [{"type": "i32", "value": "1"}]}, 
    30    {"type": "assert_invalid", "line": 150, "filename": "switch.1.wasm", "text": "unknown label", "module_type": "binary"}]}