@@ -8,7 +8,7 @@ cargo\-test \- Execute unit and integration tests of a package
8
8
.SH "SYNOPSIS"
9
9
\fB cargo test \fR [\fI options \fR ] [\fI testname \fR ] [\fB \-\- \fR \fI test \- options \fR ]
10
10
.SH "DESCRIPTION"
11
- Compile and execute unit and integration tests.
11
+ Compile and execute unit, integration, and documentation tests.
12
12
.sp
13
13
The test filtering argument \fB TESTNAME \fR and all the arguments following the two
14
14
dashes (\fB \-\- \fR ) are passed to the test binaries and thus to \fI libtest \fR (rustc's
@@ -27,11 +27,14 @@ cargo test foo \-\- \-\-test\-threads 3
27
27
.fi
28
28
.RE
29
29
.sp
30
- Tests are built with the \fB \-\- test \fR option to \fB rustc \fR which creates an
31
- executable with a \fB main \fR function that automatically runs all functions
32
- annotated with the \fB #[test] \fR attribute in multiple threads. \fB #[bench] \fR
33
- annotated functions will also be run with one iteration to verify that they
34
- are functional.
30
+ Tests are built with the \fB \-\- test \fR option to \fB rustc \fR which creates a special
31
+ executable by linking your code with libtest. The executable automatically
32
+ runs all functions annotated with the \fB #[test] \fR attribute in multiple threads.
33
+ \fB #[bench] \fR annotated functions will also be run with one iteration to verify
34
+ that they are functional.
35
+ .sp
36
+ If the package contains multiple test targets, each target compiles to a
37
+ special executable as aforementioned, and then is run serially.
35
38
.sp
36
39
The libtest harness may be disabled by setting \fB harness = false \fR in the target
37
40
manifest settings, in which case your code will need to provide its own \fB main \fR
0 commit comments