diff options
author | DJMcNab <[email protected]> | 2018-12-08 16:02:23 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-12-08 16:28:10 +0000 |
commit | f88e0700e6c4a9b195739154f8683704762df1bd (patch) | |
tree | f263d568056f88be01fbd6d4e67f967b71645b60 /crates/ra_analysis/tests/tests.rs | |
parent | 6d548d944fade78edd474433b2436bae3237737e (diff) |
Add a better text for hover and stop duplicating work done in approximatelly_resolve_symbol
Diffstat (limited to 'crates/ra_analysis/tests/tests.rs')
-rw-r--r-- | crates/ra_analysis/tests/tests.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs index 4ce2c5c85..05ad687ae 100644 --- a/crates/ra_analysis/tests/tests.rs +++ b/crates/ra_analysis/tests/tests.rs | |||
@@ -21,9 +21,9 @@ fn approximate_resolve_works_in_items() { | |||
21 | ", | 21 | ", |
22 | ); | 22 | ); |
23 | 23 | ||
24 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); | 24 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); |
25 | assert_eq_dbg( | 25 | assert_eq_dbg( |
26 | r#"[(FileId(1), FileSymbol { name: "Foo", node_range: [0; 11), kind: STRUCT_DEF })]"#, | 26 | r#"([23; 26), [(FileId(1), FileSymbol { name: "Foo", node_range: [0; 11), kind: STRUCT_DEF })])"#, |
27 | &symbols, | 27 | &symbols, |
28 | ); | 28 | ); |
29 | } | 29 | } |
@@ -39,9 +39,9 @@ fn test_resolve_module() { | |||
39 | ", | 39 | ", |
40 | ); | 40 | ); |
41 | 41 | ||
42 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); | 42 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); |
43 | assert_eq_dbg( | 43 | assert_eq_dbg( |
44 | r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, | 44 | r#"([4; 7), [(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })])"#, |
45 | &symbols, | 45 | &symbols, |
46 | ); | 46 | ); |
47 | 47 | ||
@@ -54,9 +54,9 @@ fn test_resolve_module() { | |||
54 | ", | 54 | ", |
55 | ); | 55 | ); |
56 | 56 | ||
57 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); | 57 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); |
58 | assert_eq_dbg( | 58 | assert_eq_dbg( |
59 | r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, | 59 | r#"([4; 7), [(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })])"#, |
60 | &symbols, | 60 | &symbols, |
61 | ); | 61 | ); |
62 | } | 62 | } |