Integration Tests
The tests directory.
What Are Integration Tests?
Integration tests verify your crate's public API the way an external user would. They live outside src and can only call public items.
The tests Directory
Cargo treats every file in the top-level tests/ directory as a separate test crate. No #[cfg(test)] module is needed there.
tests/api.rstests/parsing.rs
All lessons in this course
- Unit Tests
- Integration Tests
- Doc Comments
- Doc Tests