diff options
Diffstat (limited to 'crates/ide/src/fn_references.rs')
-rw-r--r-- | crates/ide/src/fn_references.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/crates/ide/src/fn_references.rs b/crates/ide/src/fn_references.rs index 1989a562b..459f201ed 100644 --- a/crates/ide/src/fn_references.rs +++ b/crates/ide/src/fn_references.rs | |||
@@ -25,15 +25,14 @@ fn method_range(item: SyntaxNode, file_id: FileId) -> Option<FileRange> { | |||
25 | 25 | ||
26 | #[cfg(test)] | 26 | #[cfg(test)] |
27 | mod tests { | 27 | mod tests { |
28 | use crate::mock_analysis::analysis_and_position; | 28 | use crate::fixture; |
29 | use crate::{FileRange, TextSize}; | 29 | use crate::{FileRange, TextSize}; |
30 | use std::ops::RangeInclusive; | 30 | use std::ops::RangeInclusive; |
31 | 31 | ||
32 | #[test] | 32 | #[test] |
33 | fn test_find_all_methods() { | 33 | fn test_find_all_methods() { |
34 | let (analysis, pos) = analysis_and_position( | 34 | let (analysis, pos) = fixture::position( |
35 | r#" | 35 | r#" |
36 | //- /lib.rs | ||
37 | fn private_fn() {<|>} | 36 | fn private_fn() {<|>} |
38 | 37 | ||
39 | pub fn pub_fn() {} | 38 | pub fn pub_fn() {} |
@@ -48,9 +47,8 @@ mod tests { | |||
48 | 47 | ||
49 | #[test] | 48 | #[test] |
50 | fn test_find_trait_methods() { | 49 | fn test_find_trait_methods() { |
51 | let (analysis, pos) = analysis_and_position( | 50 | let (analysis, pos) = fixture::position( |
52 | r#" | 51 | r#" |
53 | //- /lib.rs | ||
54 | trait Foo { | 52 | trait Foo { |
55 | fn bar() {<|>} | 53 | fn bar() {<|>} |
56 | fn baz() {} | 54 | fn baz() {} |
@@ -64,7 +62,7 @@ mod tests { | |||
64 | 62 | ||
65 | #[test] | 63 | #[test] |
66 | fn test_skip_tests() { | 64 | fn test_skip_tests() { |
67 | let (analysis, pos) = analysis_and_position( | 65 | let (analysis, pos) = fixture::position( |
68 | r#" | 66 | r#" |
69 | //- /lib.rs | 67 | //- /lib.rs |
70 | #[test] | 68 | #[test] |