An auto-generated test plan
is a test plan with a unique-id
that is generated by parsing the WGSL specification using this tool. A typical auto-generated WGSL test plan:
g.test(<name>)
.uniqueId(<unique-id>)
.specURL(<url>)
.desc(<description>)
.params(u => u.combine('placeHolder1', ['placeHolder2', 'placeHolder3']))
.unimplemented();
name
: An arbitrary name.url
: The URL of the section this test plan is extracted from, ie.https://www.w3.org/TR/<version>/#<section-name>
.section-name
is the section of the WGSL specification this test plan is generated from.description
: The portion of WGSL specification this test plan is generated from.unique-id
: A token used for tracking and updating the auto generated test plans.
unique-id = sha1(<section-name> + <description>)
To implement an auto-generated test plan:
- Choose an auto-generated test plan that is not currently under development, ie. looking up the
unique-id
in this list must not return any results. - Submit a new issue using this template. Make sure to include the
unique-id
andurl
. - Implement the test plan. You may modify the test name and description; however,
url
andunique-id
must remain unchanged. - Add a comment to the issue (created in step 2) with a link to your merged pull request. Then close the issue with status
Fixed
.
Take advantage of the helpers, specially:
- Helpers for WGSL data types.
- Helpers for WGSL builtin function execution tests.
- Base fixture for WebGPU validation tests.
- Builtin-function execution test example: abs.spec.ts.