blob: 58c96078bfe39daecb9dd821204a4969b5b4caa4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// META: global=window,dedicatedworker,jsshell,shadowrealm
// META: script=/wasm/jsapi/assertions.js
function assert_type(argument) {
const tag = new WebAssembly.Tag(argument);
const tagtype = tag.type();
assert_array_equals(tagtype.parameters, argument.parameters);
}
test(() => {
assert_type({ parameters: [] });
}, "[]");
test(() => {
assert_type({ parameters: ["i32", "i64"] });
}, "[i32 i64]");
test(() => {
assert_type({ parameters: ["i32", "i64", "f32", "f64"] });
}, "[i32 i64 f32 f64]");
|