From 8774067a879a814940b9917efd13c40d8e0fc8b2 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 14 Mar 2019 13:27:21 +0300 Subject: sort navigations to make tests stable --- crates/ra_ide_api/src/impls.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { 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])); } -- cgit v1.2.3