1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-22 14:59:37 +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:
andriyDev 2024-12-17 09:37:11 -08:00 committed by GitHub
parent fe554251cb
commit 5bf04964f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 10 deletions

View File

@ -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)

View File

@ -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 {