diff options
author | Aleksey Kladov <[email protected]> | 2018-08-09 15:44:40 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-09 15:54:49 +0100 |
commit | afa94d4f37b9a0a1e723edffcc79c3d48799bad1 (patch) | |
tree | ea4a5163bee5f202c3627b88280e74a704c186d0 /docs | |
parent | d8b2a5efc0e5de3b0d72f29ccc86185f0827c9d3 (diff) |
fn_item -> function
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 |