mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-03-21 22:49:44 +02:00
Fix the unit testing docs referring to integration tests (#2524)
The side bar is out of date, and also the the unit testing docs are talking about integration tests. These tests are discussed on the next slide in "Other Types of Tests".
This commit is contained in:
parent
fe554251cb
commit
5bf04964f6
@ -183,7 +183,7 @@
|
|||||||
- [Exercise: Modules for a GUI Library](modules/exercise.md)
|
- [Exercise: Modules for a GUI Library](modules/exercise.md)
|
||||||
- [Solution](modules/solution.md)
|
- [Solution](modules/solution.md)
|
||||||
- [Testing](testing.md)
|
- [Testing](testing.md)
|
||||||
- [Test Modules](testing/unit-tests.md)
|
- [Unit Tests](testing/unit-tests.md)
|
||||||
- [Other Types of Tests](testing/other.md)
|
- [Other Types of Tests](testing/other.md)
|
||||||
- [Compiler Lints and Clippy](testing/lints.md)
|
- [Compiler Lints and Clippy](testing/lints.md)
|
||||||
- [Exercise: Luhn Algorithm](testing/exercise.md)
|
- [Exercise: Luhn Algorithm](testing/exercise.md)
|
||||||
|
@ -4,15 +4,9 @@ minutes: 5
|
|||||||
|
|
||||||
# Unit Tests
|
# Unit Tests
|
||||||
|
|
||||||
Rust and Cargo come with a simple unit test framework:
|
Rust and Cargo come with a simple unit test framework. Tests are marked with
|
||||||
|
`#[test]`. Unit tests are often put in a nested `tests` module, using
|
||||||
- Unit tests are supported throughout your code.
|
`#[cfg(test)]` to conditionally compile them only when building tests.
|
||||||
|
|
||||||
- Integration tests are supported via the `tests/` directory.
|
|
||||||
|
|
||||||
Tests are marked with `#[test]`. Unit tests are often put in a nested `tests`
|
|
||||||
module, using `#[cfg(test)]` to conditionally compile them only when building
|
|
||||||
tests.
|
|
||||||
|
|
||||||
```rust,editable,ignore
|
```rust,editable,ignore
|
||||||
fn first_word(text: &str) -> &str {
|
fn first_word(text: &str) -> &str {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user