Cargo has an extensive test suite. Most of it is implemented as integration tests in the testsuite directory. There are several other tests:
resolver-tests directory.crates directory have their own set of tests.build-std test is for the build-std feature. It is separate since it has some special requirements.