mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-16 17:58:16 +00:00
Merge #975
975: sort navigations to make tests stable r=matklad a=matklad Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
This commit is contained in:
commit
eb4d6cf25f
1 changed files with 2 additions and 1 deletions
|
@ -81,8 +81,9 @@ mod tests {
|
|||
fn check_goto(fixture: &str, expected: &[&str]) {
|
||||
let (analysis, pos) = analysis_and_position(fixture);
|
||||
|
||||
let navs = analysis.goto_implementation(pos).unwrap().unwrap().info;
|
||||
let mut navs = analysis.goto_implementation(pos).unwrap().unwrap().info;
|
||||
assert_eq!(navs.len(), expected.len());
|
||||
navs.sort_by_key(|nav| (nav.file_id(), nav.full_range().start()));
|
||||
navs.into_iter().enumerate().for_each(|(i, nav)| nav.assert_match(expected[i]));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue