@@ -43,26 +43,23 @@ rough heuristics:
43
43
We have not traditionally had a lot of structure in the names of
44
44
tests. Moreover, for a long time, the rustc test runner did not
45
45
support subdirectories (it now does), so test suites like
46
- [ ` src/test/run-pass ` ] have a huge mess of files in them. This is not
46
+ [ ` src/test/ui ` ] have a huge mess of files in them. This is not
47
47
considered an ideal setup.
48
48
49
- [ `src/test/run-pass ` ] : https://github.com/rust-lang/rust/tree/master/src/test/run-pass /
49
+ [ `src/test/ui ` ] : https://github.com/rust-lang/rust/tree/master/src/test/ui /
50
50
51
51
For regression tests – basically, some random snippet of code that
52
52
came in from the internet – we often just name the test after the
53
- issue. For example, ` src/test/run-pass /issue-12345.rs ` . If possible,
53
+ issue. For example, ` src/test/ui /issue-12345.rs ` . If possible,
54
54
though, it is better if you can put the test into a directory that
55
55
helps identify what piece of code is being tested here (e.g.,
56
56
` borrowck/issue-12345.rs ` is much better), or perhaps give it a more
57
57
meaningful name. Still, ** do include the issue number somewhere** .
58
58
59
59
When writing a new feature, ** create a subdirectory to store your
60
60
tests** . For example, if you are implementing RFC 1234 ("Widgets"),
61
- then it might make sense to put the tests in directories like:
62
-
63
- - ` src/test/ui/rfc1234-widgets/ `
64
- - ` src/test/run-pass/rfc1234-widgets/ `
65
- - etc
61
+ then it might make sense to put the tests in a directory like
62
+ ` src/test/ui/rfc1234-widgets/ ` .
66
63
67
64
In other cases, there may already be a suitable directory. (The proper
68
65
directory structure to use is actually an area of active debate.)
@@ -216,7 +213,7 @@ The error levels that you can have are:
216
213
## Revisions
217
214
218
215
Certain classes of tests support "revisions" (as of the time of this
219
- writing, this includes run-pass, compile-fail, run-fail, and
216
+ writing, this includes compile-fail, run-fail, and
220
217
incremental, though incremental tests are somewhat
221
218
different). Revisions allow a single test file to be used for multiple
222
219
tests. This is done by adding a special header at the top of the file:
0 commit comments