Skip to content

Commit a5d3ff8

Browse files
authored
Improve instructions for adding a new test
- Add a section for library tests - Expand section on rustdoc tests
1 parent d4ae7b0 commit a5d3ff8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/tests/adding.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,12 @@ rough heuristics:
2929
- need to run gdb or lldb? use the `debuginfo` test suite
3030
- need to inspect LLVM IR or MIR IR? use the `codegen` or `mir-opt` test
3131
suites
32-
- need to run rustdoc? Prefer a `rustdoc` test
32+
- need to run rustdoc? Prefer a `rustdoc` or `rustdoc-ui` test. Occasionally you'll need `rustdoc-js` as well.
3333
- need to inspect the resulting binary in some way? Then use `run-make`
34+
- Library tests should go in `library/$crate/tests` (where `$crate` is usually `core`, `alloc`, or `std`).
3435
- For most other things, [a `ui` (or `ui-fulldeps`) test](#ui) is to be
3536
preferred:
36-
- `ui` tests subsume both run-pass, compile-fail, and parse-fail tests
37+
- `ui` tests subsume both `run-pass`, `compile-fail`, and `parse-fail` tests
3738
- in the case of warnings or errors, `ui` tests capture the full output,
3839
which makes it easier to review but also helps prevent "hidden" regressions
3940
in the output

0 commit comments

Comments
 (0)