File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -43,20 +43,19 @@ The standard library relies very heavily on documentation tests to cover its fun
4343However, unit tests and integration tests can also be used as needed.
4444Almost all of the compiler packages have doctests disabled.
4545
46- The standard library and compiler always place all unit tests in a separate ` tests ` file
47- (this is enforced in [ tidy] [ tidy-unit-tests ] ).
48- This approach ensures that when the test file is changed, the crate does not need to be recompiled.
46+ All standard library and compiler unit tests are placed in separate ` tests ` file
47+ (which is enforced in [ tidy] [ tidy-unit-tests ] ).
48+ This ensures that when the test file is changed, the crate does not need to be recompiled.
4949For example:
5050
5151``` rust,ignore
5252#[cfg(test)]
5353mod tests;
5454```
5555
56- If it wasn't done this way, and the tests were placed in the same file as the source,
57- then changing or adding a test would cause the crate you are working on to be recompiled.
58- If you were working on something like ` core ` ,
59- then that would require recompiling the entire standard library, and the entirety of ` rustc ` .
56+ If it wasn't done this way,
57+ and you were working on something like ` core ` ,
58+ that would require recompiling the entire standard library, and the entirety of ` rustc ` .
6059
6160` ./x test ` includes some CLI options for controlling the behavior with these tests:
6261
You can’t perform that action at this time.
0 commit comments