diff options
Diffstat (limited to 'crates/ra_analysis/tests/tests.rs')
-rw-r--r-- | crates/ra_analysis/tests/tests.rs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs index 4ce2c5c85..889b568b9 100644 --- a/crates/ra_analysis/tests/tests.rs +++ b/crates/ra_analysis/tests/tests.rs | |||
@@ -21,9 +21,12 @@ 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#"ReferenceResolution { |
27 | reference_range: [23; 26), | ||
28 | resolves_to: [(FileId(1), FileSymbol { name: "Foo", node_range: [0; 11), kind: STRUCT_DEF })] | ||
29 | }"#, | ||
27 | &symbols, | 30 | &symbols, |
28 | ); | 31 | ); |
29 | } | 32 | } |
@@ -39,9 +42,12 @@ fn test_resolve_module() { | |||
39 | ", | 42 | ", |
40 | ); | 43 | ); |
41 | 44 | ||
42 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); | 45 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); |
43 | assert_eq_dbg( | 46 | assert_eq_dbg( |
44 | r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, | 47 | r#"ReferenceResolution { |
48 | reference_range: [4; 7), | ||
49 | resolves_to: [(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })] | ||
50 | }"#, | ||
45 | &symbols, | 51 | &symbols, |
46 | ); | 52 | ); |
47 | 53 | ||
@@ -54,9 +60,12 @@ fn test_resolve_module() { | |||
54 | ", | 60 | ", |
55 | ); | 61 | ); |
56 | 62 | ||
57 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); | 63 | let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); |
58 | assert_eq_dbg( | 64 | assert_eq_dbg( |
59 | r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, | 65 | r#"ReferenceResolution { |
66 | reference_range: [4; 7), | ||
67 | resolves_to: [(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })] | ||
68 | }"#, | ||
60 | &symbols, | 69 | &symbols, |
61 | ); | 70 | ); |
62 | } | 71 | } |