From f88e0700e6c4a9b195739154f8683704762df1bd Mon Sep 17 00:00:00 2001 From: DJMcNab <36049421+DJMcNab@users.noreply.github.com> Date: Sat, 8 Dec 2018 16:02:23 +0000 Subject: Add a better text for hover and stop duplicating work done in approximatelly_resolve_symbol --- crates/ra_analysis/tests/tests.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_analysis/tests/tests.rs') 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() { ", ); - let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); + let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); assert_eq_dbg( - r#"[(FileId(1), FileSymbol { name: "Foo", node_range: [0; 11), kind: STRUCT_DEF })]"#, + r#"([23; 26), [(FileId(1), FileSymbol { name: "Foo", node_range: [0; 11), kind: STRUCT_DEF })])"#, &symbols, ); } @@ -39,9 +39,9 @@ fn test_resolve_module() { ", ); - let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); + let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); assert_eq_dbg( - r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, + r#"([4; 7), [(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })])"#, &symbols, ); @@ -54,9 +54,9 @@ fn test_resolve_module() { ", ); - let symbols = analysis.approximately_resolve_symbol(pos).unwrap(); + let symbols = analysis.approximately_resolve_symbol(pos).unwrap().unwrap(); assert_eq_dbg( - r#"[(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })]"#, + r#"([4; 7), [(FileId(2), FileSymbol { name: "foo", node_range: [0; 0), kind: MODULE })])"#, &symbols, ); } -- cgit v1.2.3