File tree 1 file changed +6
-7
lines changed
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
43
43
However, unit tests and integration tests can also be used as needed.
44
44
Almost all of the compiler packages have doctests disabled.
45
45
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.
49
49
For example:
50
50
51
51
``` rust,ignore
52
52
#[cfg(test)]
53
53
mod tests;
54
54
```
55
55
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 ` .
60
59
61
60
` ./x test ` includes some CLI options for controlling the behavior with these tests:
62
61
You can’t perform that action at this time.
0 commit comments