New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing jsapi tests for wasm reference-types proposal #27099
Add missing jsapi tests for wasm reference-types proposal #27099
Conversation
0909bb3
to
f4d96c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
f4d96c7
to
e589517
Compare
…ctor and Table.set
e589517
to
14620a7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
test(() => { | ||
const argument = { "element": "i32", "initial": 3 }; | ||
assert_throws_js(TypeError, () => new WebAssembly.Table(argument)); | ||
}, "initialize table with a wrong element value"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized I haven't actually specced this behaviour. Will fix.
@@ -0,0 +1,49 @@ | |||
// META: global=window,dedicatedworker,jsshell | |||
// META: script=assertions.js | |||
// META: script=/wasm/jsapi/wasm-constants.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this intentional? I'm not seeing a wasm-constants.js
file in this location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this was removed in #16326. Will fix.
The WebAssembly reference types proposal adds optional initializing parameter for Table.ctor, Table.grow js apis and makes the second parameter for Table.set optional.
The link to the spec: https://webassembly.github.io/reference-types/js-api/index.html#tables.
We already have tests for Table.grow but tests for Table.ctor and Table.set are missed.
This PR adds these missing tests.