Skip to content

Commit eca06da

Browse files
committed
docs(dev-guide): mention test helpers and Assert
1 parent 689a1d3 commit eca06da

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

doc/dev-guide/src/coding-standards.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ Usually, a `process: &Process` variable will be available to you in the current
3434
For example, it could be in the form of a parameter of the current function,
3535
or a field of a `Cfg` instance, etc.
3636

37+
## Writing tests
38+
39+
Rustup provides a number of test helpers in the `rustup::test` module
40+
which is conditionally enabled with the `test` feature.
41+
42+
The existing tests under `tests/suite` provide good examples of how to use these
43+
helpers, but you might also find it useful to look at the documentation for
44+
particular APIs in the `rustup::test` module.
45+
46+
For example, for more information regarding end-to-end tests with the `.expect()`
47+
APIs, you can refer to the documentation of the [`Assert`] type.
48+
49+
[`Assert`]: https://github.com/search?q=repo%3Arust-lang%2Frustup+symbol%3A%2F%28%3F-i%29Assert%2F&type=code
50+
3751
## Clippy lints
3852

3953
We do not enforce lint status in the checks done by GitHub Actions, because

0 commit comments

Comments
 (0)