-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Implement IDL tests #332
Comments
Note, these tests are not a high priority, because they only verify rules that should happen automatically in any compliant WebIDL generator. |
It may be the case that there is infrastructure already out there somewhere to generate these tests.
|
Right, the workflow is the following:
In other words, Web Platform Tests already contains tests for the IDL defined in WebGPU, and there is a mechanism in place to maintain these tests (this may take a week or so, but all IDL updates should eventually make their way to Web Platform Tests) as well as to assess the validity of the IDL defined in WebGPU. |
Is there documentation on exactly what the WPT IDL tests test? It's impossible for these tests to be fully autogenerated, though. For example the autogenerator won't know how to create a GPUBuffer object, so it can't test copyBufferToBuffer. |
I realize that the end of my previous comment is at best confusing. Sorry about that. You'll still need to create IDL tests in practice. The IDL extracts in the repo just provides the raw material to ease actual testing of the interfaces but it indeed does not provide the actual tests! The IDL harness documentation describes how to setup the IDL harness to test interfaces of interest. It does not necessarily explain what tests the IDL harness runs under the hoods. The source code of the IDL harness is obviously available, but not necessarily an easy read... |
Aha, excellent, thank you for all this background info! |
IDL tests can be highly automated. WPT appears to have a helper for this: idlharness.js.
We should see about using that instead of writing any of our own IDL tests.
See also previous notes: https://hackmd.io/@webgpu/SJtUks9CU
The text was updated successfully, but these errors were encountered: