mirror of https://github.com/nodejs/node.git
test: update wasm/jsapi web platform tests
PR-URL: https://github.com/nodejs/node/pull/44100 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>pull/44169/head
parent
5465886d5d
commit
f136e7ec31
|
@ -27,7 +27,7 @@ Last update:
|
|||
- streams: https://github.com/web-platform-tests/wpt/tree/8f60d94439/streams
|
||||
- url: https://github.com/web-platform-tests/wpt/tree/0e5b126cd0/url
|
||||
- user-timing: https://github.com/web-platform-tests/wpt/tree/df24fb604e/user-timing
|
||||
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/1dd414c796/wasm/jsapi
|
||||
- wasm/jsapi: https://github.com/web-platform-tests/wpt/tree/d8dbe6990b/wasm/jsapi
|
||||
- wasm/webapi: https://github.com/web-platform-tests/wpt/tree/fd1b23eeaa/wasm/webapi
|
||||
- WebCryptoAPI: https://github.com/web-platform-tests/wpt/tree/cdd0f03df4/WebCryptoAPI
|
||||
- webidl/ecmascript-binding/es-exceptions: https://github.com/web-platform-tests/wpt/tree/a370aad338/webidl/ecmascript-binding/es-exceptions
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
"path": "user-timing"
|
||||
},
|
||||
"wasm/jsapi": {
|
||||
"commit": "1dd414c79616489ea021c800eb0375a709e8114e",
|
||||
"commit": "d8dbe6990bed03ec03beee25069a9347d4c3d6d5",
|
||||
"path": "wasm/jsapi"
|
||||
},
|
||||
"wasm/webapi": {
|
||||
|
|
|
@ -87,6 +87,11 @@ test(() => {
|
|||
}
|
||||
}, "Invalid type argument");
|
||||
|
||||
test(() => {
|
||||
const argument = { "value": "v128" };
|
||||
assert_throws_js(TypeError, () => new WebAssembly.Global(argument));
|
||||
}, "Construct v128 global");
|
||||
|
||||
test(() => {
|
||||
const argument = { "value": "i64" };
|
||||
const global = new WebAssembly.Global(argument);
|
||||
|
|
|
@ -50,12 +50,12 @@ test(() => {
|
|||
}, "externref, immutable")
|
||||
|
||||
test(() => {
|
||||
assert_type({"value": "anyfunc", "mutable": true})
|
||||
}, "anyfunc, mutable")
|
||||
assert_type({"value": "funcref", "mutable": true})
|
||||
}, "funcref, mutable")
|
||||
|
||||
test(() => {
|
||||
assert_type({"value": "anyfunc", "mutable": false})
|
||||
}, "anyfunc, immutable")
|
||||
assert_type({"value": "funcref", "mutable": false})
|
||||
}, "funcref, immutable")
|
||||
|
||||
test(() => {
|
||||
const myglobal = new WebAssembly.Global({"value": "i32", "mutable": true});
|
||||
|
|
|
@ -10,17 +10,17 @@ function assert_type(argument) {
|
|||
}
|
||||
|
||||
test(() => {
|
||||
assert_type({ "minimum": 0, "element": "anyfunc"});
|
||||
assert_type({ "minimum": 0, "element": "funcref"});
|
||||
}, "Zero initial, no maximum");
|
||||
|
||||
test(() => {
|
||||
assert_type({ "minimum": 5, "element": "anyfunc" });
|
||||
assert_type({ "minimum": 5, "element": "funcref" });
|
||||
}, "Non-zero initial, no maximum");
|
||||
|
||||
test(() => {
|
||||
assert_type({ "minimum": 0, "maximum": 0, "element": "anyfunc" });
|
||||
assert_type({ "minimum": 0, "maximum": 0, "element": "funcref" });
|
||||
}, "Zero maximum");
|
||||
|
||||
test(() => {
|
||||
assert_type({ "minimum": 0, "maximum": 5, "element": "anyfunc" });
|
||||
assert_type({ "minimum": 0, "maximum": 5, "element": "funcref" });
|
||||
}, "Non-zero maximum");
|
||||
|
|
Loading…
Reference in New Issue