diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/TESTS.md | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/TESTS.md b/docs/TESTS.md index db06dbebc..a9d32d1d4 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md | |||
@@ -24,20 +24,20 @@ recovery and it is totally ok for a parser to not implement any error | |||
24 | recovery at all. However, for libsyntax2.0 we do care about error | 24 | recovery at all. However, for libsyntax2.0 we do care about error |
25 | recovery, and we do care about precise and useful error messages. | 25 | recovery, and we do care about precise and useful error messages. |
26 | 26 | ||
27 | There are also so-called "inline tests". They appear as the comments | 27 | There are also so-called "inline tests". They appear as the comments |
28 | with a `test` header in the source code, like this: | 28 | with a `test` header in the source code, like this: |
29 | 29 | ||
30 | ```rust | 30 | ```rust |
31 | // test fn_basic | 31 | // test fn_basic |
32 | // fn foo() {} | 32 | // fn foo() {} |
33 | fn fn_item(p: &mut Parser) { | 33 | fn function(p: &mut Parser) { |
34 | // ... | 34 | // ... |
35 | } | 35 | } |
36 | ``` | 36 | ``` |
37 | 37 | ||
38 | You can run `cargo collect-tests` command to collect all inline tests | 38 | You can run `cargo collect-tests` command to collect all inline tests |
39 | into `tests/data/inline` directory. The main advantage of inline tests | 39 | into `tests/data/inline` directory. The main advantage of inline tests |
40 | is that they help to illustrate what the relevant code is doing. | 40 | is that they help to illustrate what the relevant code is doing. |
41 | 41 | ||
42 | 42 | ||
43 | Contribution opportunity: design and implement testing infrastructure | 43 | Contribution opportunity: design and implement testing infrastructure |