rust-lang / rust-lang/polonius
improve unit tests, add more
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.7k
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
Right now if you run cargo test, we will load the facts and run the borrow check algorithm, but we don't check it is "correct":
I think what we want to do is to add the ability to support more than one algorithm for computing the output facts. Then we can test the "advanced" algorithms against the "naive" one, which is basically known to be correct.
Alternatively, we could just store "reference" facts.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading src/test.rs around lines 35-37 and running cargo test to understand the current fact-loading and borrow-check flow. Determine how correctness should be validated, either by comparing advanced algorithms with the naive algorithm or by using reference facts. Done means the tests detect incorrect output facts rather than only exercising execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, testing-qa
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100