Skip to content

Commit

Permalink
Merge pull request #139 from albins/testing-doc
Browse files Browse the repository at this point in the history
[WIP] Describe standard proceedure for writing and running tests in the book
  • Loading branch information
nikomatsakis authored Mar 9, 2020
2 parents d24a531 + 78b05d0 commit 8d722d3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
- [Rules](./rules.md)
- [Atoms](./rules/atoms.md)
- [Initialization](./rules/initialization.md)
- [Testing Polonius](./testing.md)
- [See also](./see_also.md)
16 changes: 16 additions & 0 deletions book/src/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Testing Polonius

## Rust UI Tests with Polonius Compare Mode

There is a mode of the Rust test suite that compares Polonius' output to the
current NLL one. You can invoke it by using `--compare-mode polonius`. For
example, the following will run the UI tests:

```
$ ./x.py test -i --stage 1 --compare-mode polonius src/test/ui
```

## Polonius' Own Unit Test

(Not yet written, but this section should describe how to use `polonius-parser`
to generate input for unit tests.)

0 comments on commit 8d722d3

Please sign in to comment.