Skip to content
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

Merged

Conversation

@dbezhetskov
Copy link

@dbezhetskov dbezhetskov commented Jan 8, 2021

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.

@wpt-pr-bot wpt-pr-bot added the wasm label Jan 8, 2021
@wpt-pr-bot wpt-pr-bot requested review from Ms2ger and titzer Jan 8, 2021
@dbezhetskov dbezhetskov force-pushed the dbezhetskov:add-tests-for-wasm-table branch from 0909bb3 to f4d96c7 Jan 8, 2021
Copy link
Contributor

@Ms2ger Ms2ger left a comment

Thanks!

wasm/jsapi/table/set-reftypes.tentative.any.js Outdated Show resolved Hide resolved
wasm/jsapi/table/set-reftypes.tentative.any.js Outdated Show resolved Hide resolved
@dbezhetskov dbezhetskov force-pushed the dbezhetskov:add-tests-for-wasm-table branch from f4d96c7 to e589517 Jan 11, 2021
@dbezhetskov dbezhetskov requested a review from Ms2ger Jan 11, 2021
@dbezhetskov dbezhetskov force-pushed the dbezhetskov:add-tests-for-wasm-table branch from e589517 to 14620a7 Jan 14, 2021
@Ms2ger
Ms2ger approved these changes Jan 14, 2021
Copy link
Contributor

@Ms2ger Ms2ger left a comment

Thanks!

test(() => {
const argument = { "element": "i32", "initial": 3 };
assert_throws_js(TypeError, () => new WebAssembly.Table(argument));
}, "initialize table with a wrong element value");
Comment on lines +23 to +26

This comment has been minimized.

@Ms2ger

Ms2ger Jan 14, 2021
Contributor

I realized I haven't actually specced this behaviour. Will fix.

@Ms2ger Ms2ger merged commit 74cea76 into web-platform-tests:master Jan 14, 2021
32 checks passed
32 checks passed
update-pr-preview
Details
Azure Pipelines Build #20210114.16 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: Safari Technology Preview succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
download-firefox-nightly Community-TC (pull_request)
Details
infrastructure/ tests Community-TC (pull_request)
Details
infrastructure/ tests (Python 3) Community-TC (pull_request)
Details
lint Community-TC (pull_request)
Details
resources/ tests (Python 2) Community-TC (pull_request)
Details
resources/ tests (Python 3.6) Community-TC (pull_request)
Details
resources/ tests (Python 3.8) Community-TC (pull_request)
Details
sink-task Community-TC (pull_request)
Details
tools/ integration tests (Python 2) Community-TC (pull_request)
Details
tools/ integration tests (Python 3.6) Community-TC (pull_request)
Details
tools/ integration tests (Python 3.8) Community-TC (pull_request)
Details
tools/ unittests (Python 2) Community-TC (pull_request)
Details
tools/ unittests (Python 3.6) Community-TC (pull_request)
Details
tools/ unittests (Python 3.8) Community-TC (pull_request)
Details
update-built Community-TC (pull_request)
Details
wpt-chrome-dev-results Community-TC (pull_request)
Details
wpt-chrome-dev-results-without-changes Community-TC (pull_request)
Details
wpt-chrome-dev-stability Community-TC (pull_request)
Details
wpt-decision-task Community-TC (pull_request)
Details
wpt-firefox-nightly-results Community-TC (pull_request)
Details
wpt-firefox-nightly-results-without-changes Community-TC (pull_request)
Details
wpt-firefox-nightly-stability Community-TC (pull_request)
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@@ -0,0 +1,49 @@
// META: global=window,dedicatedworker,jsshell
// META: script=assertions.js
// META: script=/wasm/jsapi/wasm-constants.js

This comment has been minimized.

@eqrion

eqrion Jan 22, 2021
Contributor

Was this intentional? I'm not seeing a wasm-constants.js file in this location?

This comment has been minimized.

@Ms2ger

Ms2ger Jan 22, 2021
Contributor

Oh, this was removed in #16326. Will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants