Automatic update from web-platform-tests Remove ShadowRealm test coverage This intentionally does not make infrastructure or documentation changes, but without implementer support all the ShadowRealm tests add significant noise. Once there is implementer support this can be reverted. -- wpt-commits: e4a4672e9e607fc2b28e7173b83ce4e38ef53071 wpt-pr: 59794
17 lines
498 B
JavaScript
17 lines
498 B
JavaScript
// META: global=window,dedicatedworker,jsshell
|
|
// META: script=/wasm/jsapi/assertions.js
|
|
|
|
function addxy(x, y) {
|
|
return x + y
|
|
}
|
|
|
|
test(() => {
|
|
var fun = new WebAssembly.Function({parameters: ["i32", "i32"], results: ["i32"]}, addxy);
|
|
assert_equals(fun(1, 2), 3)
|
|
}, "test calling function")
|
|
|
|
test(() => {
|
|
var fun = new WebAssembly.Function({parameters: ["i32", "i32"], results: ["i32"]}, addxy);
|
|
assert_throws_js(TypeError, () => new fun(1, 2));
|
|
}, "test constructing function");
|