-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[red-knot] consolidate diagnostic and inference tests (#13248)
Pull the tests from `types.rs` into `infer.rs`. All of these are integration tests with the same basic form: create a code sample, run type inference or check on it, and make some assertions about types and/or diagnostics. These are the sort of tests we will want to move into a test framework with a low-boilerplate custom textual format. In the meantime, having them together (and more importantly, their helper utilities together) means that it's easy to keep tests for related language features together (iterable tests with other iterable tests, callable tests with other callable tests), without an artificial split based on tests which test diagnostics vs tests which test inference. And it allows a single test to more easily test both diagnostics and inference. (Ultimately in the test framework, they will likely all test diagnostics, just in some cases the diagnostics will come from `reveal_type()`.)
- Loading branch information
Showing
2 changed files
with
285 additions
and
326 deletions.
There are no files selected for viewing
This file contains 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
Oops, something went wrong.