aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_ssr/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_ssr/src/tests.rs')
-rw-r--r--crates/ide_ssr/src/tests.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_ssr/src/tests.rs b/crates/ide_ssr/src/tests.rs
index 1d8565dc0..444c6b0af 100644
--- a/crates/ide_ssr/src/tests.rs
+++ b/crates/ide_ssr/src/tests.rs
@@ -75,7 +75,7 @@ pub(crate) fn single_file(code: &str) -> (ide_db::RootDatabase, FilePosition, Ve
75 match range_or_offset { 75 match range_or_offset {
76 RangeOrOffset::Range(range) => { 76 RangeOrOffset::Range(range) => {
77 position = FilePosition { file_id, offset: range.start() }; 77 position = FilePosition { file_id, offset: range.start() };
78 selections = vec![FileRange { file_id, range: range }]; 78 selections = vec![FileRange { file_id, range }];
79 } 79 }
80 RangeOrOffset::Offset(offset) => { 80 RangeOrOffset::Offset(offset) => {
81 position = FilePosition { file_id, offset }; 81 position = FilePosition { file_id, offset };
@@ -129,7 +129,7 @@ fn assert_matches(pattern: &str, code: &str, expected: &[&str]) {
129 let matched_strings: Vec<String> = 129 let matched_strings: Vec<String> =
130 match_finder.matches().flattened().matches.iter().map(|m| m.matched_text()).collect(); 130 match_finder.matches().flattened().matches.iter().map(|m| m.matched_text()).collect();
131 if matched_strings != expected && !expected.is_empty() { 131 if matched_strings != expected && !expected.is_empty() {
132 print_match_debug_info(&match_finder, position.file_id, &expected[0]); 132 print_match_debug_info(&match_finder, position.file_id, expected[0]);
133 } 133 }
134 assert_eq!(matched_strings, expected); 134 assert_eq!(matched_strings, expected);
135} 135}