mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
wasn't a typo
+1
-1
@@ -9,7 +9,7 @@ fn return_none_if_empty() {
|
||||
}
|
||||
```
|
||||
|
||||
A test function's signature must have no arguments and no return value. To run the tests in a create, it must be compiled with the '--test' flag: `rustc myprogram.rs --test -o myprogram-tests`. Running the resulting executable will run all the tests in the crate. A test is considered successful if its function returns; if the task running the test fails, through a call to `fail!`, a failed `check` or `assert`, or some other means, then the test fails.
|
||||
A test function's signature must have no arguments and no return value. To run the tests in a crate, it must be compiled with the '--test' flag: `rustc myprogram.rs --test -o myprogram-tests`. Running the resulting executable will run all the tests in the crate. A test is considered successful if its function returns; if the task running the test fails, through a call to `fail!`, a failed `check` or `assert`, or some other means, then the test fails.
|
||||
|
||||
When compiling a crate with the '--test' flag '--cfg test' is also implied, so that tests can be conditionally compiled.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user