Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Describe standard proceedure for writing and running tests in the book #139

Merged
merged 1 commit into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.)