aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/tests/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/tests/tests.rs')
-rw-r--r--crates/ra_analysis/tests/tests.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs
index 05ad687ae..889b568b9 100644
--- a/crates/ra_analysis/tests/tests.rs
+++ b/crates/ra_analysis/tests/tests.rs
@@ -23,7 +23,10 @@ fn approximate_resolve_works_in_items() {
23 23
24 let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); 24 let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap();
25 assert_eq_dbg( 25 assert_eq_dbg(
26 r#"([23; 26), [(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}
@@ -41,7 +44,10 @@ fn test_resolve_module() {
41 44
42 let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); 45 let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap();
43 assert_eq_dbg( 46 assert_eq_dbg(
44 r#"([4; 7), [(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
@@ -56,7 +62,10 @@ fn test_resolve_module() {
56 62
57 let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); 63 let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap();
58 assert_eq_dbg( 64 assert_eq_dbg(
59 r#"([4; 7), [(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}