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.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_analysis/tests/tests.rs b/crates/ra_analysis/tests/tests.rs
index 719c166b5..fbe89f444 100644
--- a/crates/ra_analysis/tests/tests.rs
+++ b/crates/ra_analysis/tests/tests.rs
@@ -10,10 +10,10 @@ use test_utils::assert_eq_dbg;
10 10
11use ra_analysis::{ 11use ra_analysis::{
12 mock_analysis::{analysis_and_position, single_file, single_file_with_position, MockAnalysis}, 12 mock_analysis::{analysis_and_position, single_file, single_file_with_position, MockAnalysis},
13 AnalysisChange, CrateGraph, FileId, FnDescriptor, 13 AnalysisChange, CrateGraph, FileId, FnSignatureInfo,
14}; 14};
15 15
16fn get_signature(text: &str) -> (FnDescriptor, Option<usize>) { 16fn get_signature(text: &str) -> (FnSignatureInfo, Option<usize>) {
17 let (analysis, position) = single_file_with_position(text); 17 let (analysis, position) = single_file_with_position(text);
18 analysis.resolve_callable(position).unwrap().unwrap() 18 analysis.resolve_callable(position).unwrap().unwrap()
19} 19}
@@ -126,7 +126,7 @@ fn test_resolve_crate_root() {
126 let mut host = mock.analysis_host(); 126 let mut host = mock.analysis_host();
127 assert!(host.analysis().crate_for(mod_file).unwrap().is_empty()); 127 assert!(host.analysis().crate_for(mod_file).unwrap().is_empty());
128 128
129 let mut crate_graph = CrateGraph::new(); 129 let mut crate_graph = CrateGraph::default();
130 let crate_id = crate_graph.add_crate_root(root_file); 130 let crate_id = crate_graph.add_crate_root(root_file);
131 let mut change = AnalysisChange::new(); 131 let mut change = AnalysisChange::new();
132 change.set_crate_graph(crate_graph); 132 change.set_crate_graph(crate_graph);
@@ -447,8 +447,8 @@ fn test_complete_crate_path() {
447 ); 447 );
448 let completions = analysis.completions(position).unwrap().unwrap(); 448 let completions = analysis.completions(position).unwrap().unwrap();
449 assert_eq_dbg( 449 assert_eq_dbg(
450 r#"[CompletionItem { label: "foo", lookup: None, snippet: None }, 450 r#"[CompletionItem { label: "Spam", lookup: None, snippet: None },
451 CompletionItem { label: "Spam", lookup: None, snippet: None }]"#, 451 CompletionItem { label: "foo", lookup: None, snippet: None }]"#,
452 &completions, 452 &completions,
453 ); 453 );
454} 454}
@@ -466,8 +466,8 @@ fn test_complete_crate_path_with_braces() {
466 ); 466 );
467 let completions = analysis.completions(position).unwrap().unwrap(); 467 let completions = analysis.completions(position).unwrap().unwrap();
468 assert_eq_dbg( 468 assert_eq_dbg(
469 r#"[CompletionItem { label: "foo", lookup: None, snippet: None }, 469 r#"[CompletionItem { label: "Spam", lookup: None, snippet: None },
470 CompletionItem { label: "Spam", lookup: None, snippet: None }]"#, 470 CompletionItem { label: "foo", lookup: None, snippet: None }]"#,
471 &completions, 471 &completions,
472 ); 472 );
473} 473}