You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiletest.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@ configure behavior and expected results of both individual and groups of tests.
6
6
7
7
`compiletest` tests may check test code for success, for failure or in some cases, even failure to compile. Tests are
8
8
typically organized as a Rust source file with annotations in comments before and/or within the test code, which serve to
9
-
direct `compiletest` on if or how to run the test, what behavior to expect, and more.
9
+
direct `compiletest` on if or how to run the test, what behavior to expect, and more. If you are unfamiliar with the compiler
10
+
testing framework, see [`this chapter`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/intro.md) for additional background.
10
11
11
12
The tests themselves are typically (but not always) organized into "suites"--for example, `run-pass`, a folder
12
13
representing tests that should succeed, `run-fail`, a folder holding tests that should compile successfully, but return
@@ -16,8 +17,9 @@ introduction to the different suites of compiler tests along with details about
16
17
[here, at Brian Anderson's blog](https://brson.github.io/2017/07/10/how-rust-is-tested#s-ct).
17
18
18
19
## Adding a new test file
19
-
Simply create your new test in the appropriate location under [src/test](https://github.com/rust-lang/rust/tree/master/src/test). No registration of test files is necessary as
20
+
Briefly, simply create your new test in the appropriate location under [src/test](https://github.com/rust-lang/rust/tree/master/src/test). No registration of test files is necessary as
20
21
`compiletest` will scan the [src/test](https://github.com/rust-lang/rust/tree/master/src/test) subfolder recursively, and will execute any Rust source files it finds as tests.
22
+
See [`Adding new tests`](https://github.com/rust-lang-nursery/rustc-guide/blob/master/src/tests/adding.md) for a complete guide on how to adding new tests.
21
23
22
24
## Header Commands
23
25
Source file annotations which appear in comments near the top of the source file *before* any test code are known as header
0 commit comments