Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /wasm/jsapi/tag/type.tentative.any.js - WPT Dashboard Interop Dashboard
- /wasm/jsapi/tag/type.tentative.any.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/tag/type.tentative.any.shadowrealm.html - WPT Dashboard Interop Dashboard
- /wasm/jsapi/tag/type.tentative.any.worker.html - WPT Dashboard Interop Dashboard
// 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]");