diff options
author | Aleksey Kladov <[email protected]> | 2020-06-26 17:41:11 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-06-26 17:41:11 +0100 |
commit | a1c327ec1c09739865a47e204d7195926faf34d8 (patch) | |
tree | 750daeb28bd3d62fd24882d5b64f7da7c222c87a /docs | |
parent | 89277e7a422fee67ef6c068d9430ab6bc88847ba (diff) |
Document test minimality
Diffstat (limited to 'docs')
-rw-r--r-- | docs/dev/README.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/dev/README.md b/docs/dev/README.md index 76e1da6cf..11dc5261b 100644 --- a/docs/dev/README.md +++ b/docs/dev/README.md | |||
@@ -166,6 +166,17 @@ That said, adding an innocent-looking `pub use` is a very simple way to break en | |||
166 | Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate | 166 | Note: if you enjoyed this abstract hand-waving about boundaries, you might appreciate |
167 | https://www.tedinski.com/2018/02/06/system-boundaries.html | 167 | https://www.tedinski.com/2018/02/06/system-boundaries.html |
168 | 168 | ||
169 | ## Minimal Tests | ||
170 | |||
171 | Most tests in rust-analyzer start with a snippet of Rust code. | ||
172 | This snippets should be minimal -- if you copy-paste a snippet of real code into the tests, make sure to remove everything which could be removed. | ||
173 | There are many benefits to this: | ||
174 | |||
175 | * less to read or to scroll past | ||
176 | * easier to understand what exactly is tested | ||
177 | * less stuff printed during printf-debugging | ||
178 | * less time to run test | ||
179 | |||
169 | ## Order of Imports | 180 | ## Order of Imports |
170 | 181 | ||
171 | We separate import groups with blank lines | 182 | We separate import groups with blank lines |