diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-06-10 16:10:37 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-06-10 16:10:37 -0400 |
| commit | 79b4ec2639d4f86eb3c5828003bc0aa7118c9928 (patch) | |
| tree | b1e17c0798ae13eea698494a65ba3bb11fd3c67c /src/doc/rustc-dev-guide | |
| parent | cea1489422e9f415fa8e8f7fa597e392e9def58c (diff) | |
| parent | 51c8f5153862b552fe4d273065dc25294e81e98e (diff) | |
| download | rust-79b4ec2639d4f86eb3c5828003bc0aa7118c9928.tar.gz rust-79b4ec2639d4f86eb3c5828003bc0aa7118c9928.zip | |
Merge pull request #149 from rust-lang-nursery/mark-i-m-patch-1
clarify run-rustfix compiletest header
Diffstat (limited to 'src/doc/rustc-dev-guide')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/tests/adding.md | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/doc/rustc-dev-guide/src/tests/adding.md b/src/doc/rustc-dev-guide/src/tests/adding.md index 3788e7c41c5..fac13fcacfe 100644 --- a/src/doc/rustc-dev-guide/src/tests/adding.md +++ b/src/doc/rustc-dev-guide/src/tests/adding.md @@ -149,9 +149,14 @@ exhaustive. Header commands can generally be found by browsing the source. * `run-rustfix` for UI tests, indicates that the test produces - structured suggestions, which are then applied and the final - source is stored in a `.fixed` file and compiled again. The final - compilation is required to succeed. + structured suggestions. The test writer should create a `.fixed` + file, which contains the source with the suggestions applied. + When the test is run, compiletest first checks that the correct + lint/warning is generated. Then, it applies the suggestion and + compares against `.fixed` (they must match). Finally, the fixed + source is compiled, and this compilation is required to succeed. + The `.fixed` file can also be generated automatically with the + `--bless` option, discussed [below](#bless). * `min-{gdb,lldb}-version` * `min-llvm-version` * `compile-pass` for UI tests, indicates that the test is @@ -267,6 +272,8 @@ you can even run the resulting program. Just add one of the following - `// run-pass` -- compilation should succeed and we should run the resulting binary +<a name="bless"></a> + ### Editing and updating the reference files If you have changed the compiler's output intentionally, or you are |
