In this chapter, we will continue with Cargo and learn how to write tests, how to document our code, and how to measure the performance of our code with benchmark tests. We'll then put those skills to use and build a simple crate that simulates logic gates, giving you an end- to-end experience of writing unit and integration tests, as well as documentation tests.
In this chapter, we'll cover the following topics:
- Motivation on testing
- Organizing tests and testing primitives
- Unit tests and integration tests
- Documentation tests
- Benchmark tests
- Continuous integration with Travis CI