Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Tests

Cargo has an extensive test suite. Most of it is implemented as integration tests in the testsuite directory. There are several other tests:

  • Unit tests are scattered throughout.
  • The dependency resolver has its own set of tests in the resolver-tests directory.
  • All of the packages in the crates directory have their own set of tests.
  • The build-std test is for the build-std feature. It is separate since it has some special requirements.
  • Documentation has a variety of tests, such as link validation, and the SemVer chapter validity checks.