diff options
author | Jeremy A. Kolb <[email protected]> | 2018-10-24 19:24:32 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-10-31 20:30:57 +0000 |
commit | 406f366ccc8b903f457cc694dc1214794c0cfc88 (patch) | |
tree | 73fded51f2b3f41a0f08683291cda25b0cfef59a /crates/ra_analysis/tests | |
parent | 55ebe6380aef233fff86b7e6cead361787bf1f65 (diff) |
Add DeclarationDescriptor and ReferenceDescriptor
Fixes #142
Fixes #146
Diffstat (limited to 'crates/ra_analysis/tests')
-rw-r--r-- | crates/ra_analysis/tests/tests.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs index 9e2478d9e..22d27cdbe 100644 --- a/crates/ra_analysis/tests/tests.rs +++ b/crates/ra_analysis/tests/tests.rs | |||
@@ -378,6 +378,17 @@ fn test_find_all_refs_for_param_inside() { | |||
378 | } | 378 | } |
379 | 379 | ||
380 | #[test] | 380 | #[test] |
381 | fn test_find_all_refs_for_fn_param() { | ||
382 | let code = r#" | ||
383 | fn foo(i<|> : u32) -> u32 { | ||
384 | i | ||
385 | }"#; | ||
386 | |||
387 | let refs = get_all_refs(code); | ||
388 | assert_eq!(refs.len(), 2); | ||
389 | } | ||
390 | |||
391 | #[test] | ||
381 | fn test_complete_crate_path() { | 392 | fn test_complete_crate_path() { |
382 | let (analysis, position) = analysis_and_position(" | 393 | let (analysis, position) = analysis_and_position(" |
383 | //- /lib.rs | 394 | //- /lib.rs |