Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/tests/adding.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ guidelines:
- The majority of standard library tests are written as doctests, which
illustrate and exercise typical API behavior.
- Additional [unit tests](intro.md#package-tests) should go in
`library/${crate}/tests` (where `${crate}` is usually `core`, `alloc`, or
`std`).
`library/${crate}/tests` (where `${crate}` is usually `std`).
- Tests for the `alloc` or `core` crates must go in separate crates: `alloctests` or `coretests` respectively.
- NOTE: That when adding unit tests for unstable features the `#![feature(...)]`
declaration must be added to `library/${crate}tests/tests/lib.rs` and not to
`library/${crate}tests/lib.rs`.
- If the code is part of an isolated system, and you are not testing compiler
output, consider using a [unit or integration test](intro.md#package-tests).
- Need to run rustdoc? Prefer a `rustdoc` or `rustdoc-ui` test. Occasionally
Expand Down
Loading