aboutsummaryrefslogtreecommitdiff
path: root/docs/dev
diff options
context:
space:
mode:
Diffstat (limited to 'docs/dev')
-rw-r--r--docs/dev/architecture.md7
1 files changed, 6 insertions, 1 deletions
diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md
index 7a88ebc0f..081ee5b9d 100644
--- a/docs/dev/architecture.md
+++ b/docs/dev/architecture.md
@@ -372,11 +372,11 @@ Tests which directly call various API functions are a liability, because they ma
372So most of the tests look like this: 372So most of the tests look like this:
373 373
374```rust 374```rust
375#[track_caller]
375fn check(input: &str, expect: expect_test::Expect) { 376fn check(input: &str, expect: expect_test::Expect) {
376 // The single place that actually exercises a particular API 377 // The single place that actually exercises a particular API
377} 378}
378 379
379
380#[test] 380#[test]
381fn foo() { 381fn foo() {
382 check("foo", expect![["bar"]]); 382 check("foo", expect![["bar"]]);
@@ -397,6 +397,11 @@ There's no additional checks in CI, formatting and tidy tests are run with `carg
397 397
398**Architecture Invariant:** tests do not depend on any kind of external resources, they are perfectly reproducible. 398**Architecture Invariant:** tests do not depend on any kind of external resources, they are perfectly reproducible.
399 399
400
401### Performance Testing
402
403TBA, take a look at the `metrics` xtask and `#[test] fn benchmark_xxx()` functions.
404
400### Error Handling 405### Error Handling
401 406
402**Architecture Invariant:** core parts of rust-analyzer (`ide`/`hir`) don't interact with the outside world and thus can't fail. 407**Architecture Invariant:** core parts of rust-analyzer (`ide`/`hir`) don't interact with the outside world and thus can't fail.