aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/impls.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-14 10:29:29 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-14 10:29:29 +0000
commiteb4d6cf25f9ba886f4aa8ee46149af2807baae7f (patch)
tree6525f0a71cad6507c139ae4dc6848594d8269ec3 /crates/ra_ide_api/src/impls.rs
parenta0ded3f7c0353cdd61e9dc0ddd8e64ba8c1e64ef (diff)
parent8774067a879a814940b9917efd13c40d8e0fc8b2 (diff)
Merge #975
975: sort navigations to make tests stable r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/impls.rs')
-rw-r--r--crates/ra_ide_api/src/impls.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide_api/src/impls.rs b/crates/ra_ide_api/src/impls.rs
index 896b47f10..ee9220a15 100644
--- a/crates/ra_ide_api/src/impls.rs
+++ b/crates/ra_ide_api/src/impls.rs
@@ -81,8 +81,9 @@ mod tests {
81 fn check_goto(fixture: &str, expected: &[&str]) { 81 fn check_goto(fixture: &str, expected: &[&str]) {
82 let (analysis, pos) = analysis_and_position(fixture); 82 let (analysis, pos) = analysis_and_position(fixture);
83 83
84 let navs = analysis.goto_implementation(pos).unwrap().unwrap().info; 84 let mut navs = analysis.goto_implementation(pos).unwrap().unwrap().info;
85 assert_eq!(navs.len(), expected.len()); 85 assert_eq!(navs.len(), expected.len());
86 navs.sort_by_key(|nav| (nav.file_id(), nav.full_range().start()));
86 navs.into_iter().enumerate().for_each(|(i, nav)| nav.assert_match(expected[i])); 87 navs.into_iter().enumerate().for_each(|(i, nav)| nav.assert_match(expected[i]));
87 } 88 }
88 89