aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/tests/tests.rs
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2018-10-24 19:24:32 +0100
committerAleksey Kladov <[email protected]>2018-10-31 20:30:57 +0000
commit406f366ccc8b903f457cc694dc1214794c0cfc88 (patch)
tree73fded51f2b3f41a0f08683291cda25b0cfef59a /crates/ra_analysis/tests/tests.rs
parent55ebe6380aef233fff86b7e6cead361787bf1f65 (diff)
Add DeclarationDescriptor and ReferenceDescriptor
Fixes #142 Fixes #146
Diffstat (limited to 'crates/ra_analysis/tests/tests.rs')
-rw-r--r--crates/ra_analysis/tests/tests.rs11
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]
381fn 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]
381fn test_complete_crate_path() { 392fn test_complete_crate_path() {
382 let (analysis, position) = analysis_and_position(" 393 let (analysis, position) = analysis_and_position("
383 //- /lib.rs 394 //- /lib.rs