From 78b05d0c2bfdeba01e71a60f51a81c6b7a1075dd Mon Sep 17 00:00:00 2001 From: Albin Stjerna Date: Tue, 19 Nov 2019 09:31:17 +0100 Subject: [PATCH] Add a section about testing to the Polonius book --- book/src/SUMMARY.md | 1 + book/src/testing.md | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 book/src/testing.md diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 466cbc9b14e..c3bbff2df8e 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -7,4 +7,5 @@ - [Rules](./rules.md) - [Atoms](./rules/atoms.md) - [Initialization](./rules/initialization.md) +- [Testing Polonius](./testing.md) - [See also](./see_also.md) diff --git a/book/src/testing.md b/book/src/testing.md new file mode 100644 index 00000000000..8b5c62fb781 --- /dev/null +++ b/book/src/testing.md @@ -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.)