aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/tests/test
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/tests/test')
-rw-r--r--crates/ra_ide_api/tests/test/main.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/ra_ide_api/tests/test/main.rs b/crates/ra_ide_api/tests/test/main.rs
index 0526f7584..a83fbe07b 100644
--- a/crates/ra_ide_api/tests/test/main.rs
+++ b/crates/ra_ide_api/tests/test/main.rs
@@ -1,7 +1,8 @@
1use insta::assert_debug_snapshot_matches; 1use insta::assert_debug_snapshot_matches;
2use ra_ide_api::{ 2use ra_ide_api::{
3 mock_analysis::{single_file, single_file_with_position, MockAnalysis}, 3 mock_analysis::{single_file, single_file_with_position, MockAnalysis},
4 AnalysisChange, CrateGraph, Edition::Edition2018, FileId, Query, NavigationTarget 4 AnalysisChange, CrateGraph, Edition::Edition2018, Query, NavigationTarget,
5 ReferenceSearchResult,
5}; 6};
6use ra_syntax::{TextRange, SmolStr}; 7use ra_syntax::{TextRange, SmolStr};
7 8
@@ -44,9 +45,9 @@ fn test_resolve_crate_root() {
44 assert_eq!(host.analysis().crate_for(mod_file).unwrap(), vec![crate_id]); 45 assert_eq!(host.analysis().crate_for(mod_file).unwrap(), vec![crate_id]);
45} 46}
46 47
47fn get_all_refs(text: &str) -> Vec<(FileId, TextRange)> { 48fn get_all_refs(text: &str) -> ReferenceSearchResult {
48 let (analysis, position) = single_file_with_position(text); 49 let (analysis, position) = single_file_with_position(text);
49 analysis.find_all_refs(position).unwrap() 50 analysis.find_all_refs(position).unwrap().unwrap()
50} 51}
51 52
52fn get_symbols_matching(text: &str, query: &str) -> Vec<NavigationTarget> { 53fn get_symbols_matching(text: &str, query: &str) -> Vec<NavigationTarget> {