diff options
author | Aleksey Kladov <[email protected]> | 2021-02-09 15:13:11 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-02-09 15:13:11 +0000 |
commit | 2ac20b05f18895654ced1d243e99092441a94f86 (patch) | |
tree | 58793a5db718831aeca8c998d6496eb8da70c043 /crates/ide/src/goto_definition.rs | |
parent | 2dc67c85b94a8e858706568c4116b3123348941b (diff) |
Cleanup tests
Diffstat (limited to 'crates/ide/src/goto_definition.rs')
-rw-r--r-- | crates/ide/src/goto_definition.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/crates/ide/src/goto_definition.rs b/crates/ide/src/goto_definition.rs index 1a997fa40..c91eb1283 100644 --- a/crates/ide/src/goto_definition.rs +++ b/crates/ide/src/goto_definition.rs | |||
@@ -136,17 +136,7 @@ mod tests { | |||
136 | use crate::fixture; | 136 | use crate::fixture; |
137 | 137 | ||
138 | fn check(ra_fixture: &str) { | 138 | fn check(ra_fixture: &str) { |
139 | let (analysis, position, mut annotations) = fixture::annotations(ra_fixture); | 139 | let (analysis, position, expected) = fixture::nav_target_annotation(ra_fixture); |
140 | let (mut expected, data) = annotations.pop().unwrap(); | ||
141 | match data.as_str() { | ||
142 | "" => (), | ||
143 | "file" => { | ||
144 | expected.range = | ||
145 | TextRange::up_to(TextSize::of(&*analysis.file_text(expected.file_id).unwrap())) | ||
146 | } | ||
147 | data => panic!("bad data: {}", data), | ||
148 | } | ||
149 | |||
150 | let mut navs = | 140 | let mut navs = |
151 | analysis.goto_definition(position).unwrap().expect("no definition found").info; | 141 | analysis.goto_definition(position).unwrap().expect("no definition found").info; |
152 | if navs.len() == 0 { | 142 | if navs.len() == 0 { |