Migrate all tests to using world-file-syntax#432
Merged
alexcrichton merged 9 commits intobytecodealliance:mainfrom Nov 15, 2022
Merged
Migrate all tests to using world-file-syntax#432alexcrichton merged 9 commits intobytecodealliance:mainfrom
alexcrichton merged 9 commits intobytecodealliance:mainfrom
Conversation
This enables simplifying codegen tests as well by having each test exercise imports/exports instead of having all code generators have one case for imports and one for exports.
No longer needed as the name is inferred from the `*.wit` world.
Update all `runtime/*` tests with new naming conventions, world files, etc. Minor updates were made to names as I ended up using different conventions for the `*.wit` world files than were previously exercised. This also fixes a few minor issues with the output for the JS generator in the default ESM mode.
Various small updates here and there to namings and such.
Fix support for exported instances by using correct import paths for various types/intrinsics/etc. Additionally update the codegen tests to specify a mypy cache dir to avoid racing between tests.
Also fix an issue with the Rust host generator where it used an interface's name instead of the name of the import for import module names.
pchickey
approved these changes
Nov 15, 2022
Contributor
pchickey
left a comment
There was a problem hiding this comment.
Very much mechanical so I spot-checked and trust CI with the rest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit migrates all of
tests/codegen/*.witandtests/runtime/**/*.witto using world files rather than per-file interfaces. After this there's no more in-tree usage ofInterface::parse_fileand I'll remove that as a follow-up.Most of the changes here are mechanical changes to the tests, but various code generators also received test fixes to support new features that are now tested with worlds. For example generators inconsistently tested import/export/default interfaces and now the codegen test worlds all exercise all of these features.