mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
hir-def tests: sort results before comparing, since FxHashSet iteration order isn't guaranteed
(And, in fact, it failed on i686)
This commit is contained in:
parent
74998e46e9
commit
ff317858c1
1 changed files with 30 additions and 27 deletions
|
@ -516,6 +516,9 @@ mod tests {
|
||||||
mark
|
mark
|
||||||
))
|
))
|
||||||
})
|
})
|
||||||
|
// HashSet iteration order isn't defined - it's different on
|
||||||
|
// x86_64 and i686 at the very least
|
||||||
|
.sorted()
|
||||||
.collect::<String>();
|
.collect::<String>();
|
||||||
expect.assert_eq(&actual)
|
expect.assert_eq(&actual)
|
||||||
}
|
}
|
||||||
|
@ -831,10 +834,10 @@ mod tests {
|
||||||
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy),
|
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
dep::fmt (t)
|
||||||
dep::fmt::Display::format_method (a)
|
|
||||||
dep::fmt::Display (t)
|
dep::fmt::Display (t)
|
||||||
dep::fmt::Display::FMT_CONST (a)
|
dep::fmt::Display::FMT_CONST (a)
|
||||||
dep::fmt::Display::format_function (a)
|
dep::fmt::Display::format_function (a)
|
||||||
|
dep::fmt::Display::format_method (a)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -860,10 +863,10 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy).assoc_items_only(),
|
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy).assoc_items_only(),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt::Display::format_method (a)
|
dep::fmt::Display::FMT_CONST (a)
|
||||||
dep::fmt::Display::FMT_CONST (a)
|
dep::fmt::Display::format_function (a)
|
||||||
dep::fmt::Display::format_function (a)
|
dep::fmt::Display::format_method (a)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
|
||||||
check_search(
|
check_search(
|
||||||
|
@ -920,13 +923,13 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy),
|
Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::format (f)
|
|
||||||
dep::Fmt (v)
|
|
||||||
dep::Fmt (m)
|
dep::Fmt (m)
|
||||||
dep::Fmt (t)
|
dep::Fmt (t)
|
||||||
dep::fmt::Display::fmt (a)
|
dep::Fmt (v)
|
||||||
|
dep::fmt (t)
|
||||||
dep::fmt::Display (t)
|
dep::fmt::Display (t)
|
||||||
|
dep::fmt::Display::fmt (a)
|
||||||
|
dep::format (f)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -935,10 +938,10 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("fmt".to_string()).search_mode(SearchMode::Equals),
|
Query::new("fmt".to_string()).search_mode(SearchMode::Equals),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::Fmt (v)
|
|
||||||
dep::Fmt (m)
|
dep::Fmt (m)
|
||||||
dep::Fmt (t)
|
dep::Fmt (t)
|
||||||
|
dep::Fmt (v)
|
||||||
|
dep::fmt (t)
|
||||||
dep::fmt::Display::fmt (a)
|
dep::fmt::Display::fmt (a)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
@ -948,12 +951,12 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("fmt".to_string()).search_mode(SearchMode::Contains),
|
Query::new("fmt".to_string()).search_mode(SearchMode::Contains),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::Fmt (v)
|
|
||||||
dep::Fmt (m)
|
dep::Fmt (m)
|
||||||
dep::Fmt (t)
|
dep::Fmt (t)
|
||||||
dep::fmt::Display::fmt (a)
|
dep::Fmt (v)
|
||||||
|
dep::fmt (t)
|
||||||
dep::fmt::Display (t)
|
dep::fmt::Display (t)
|
||||||
|
dep::fmt::Display::fmt (a)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -989,12 +992,12 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("fmt".to_string()),
|
Query::new("fmt".to_string()),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::Fmt (v)
|
|
||||||
dep::Fmt (m)
|
dep::Fmt (m)
|
||||||
dep::Fmt (t)
|
dep::Fmt (t)
|
||||||
dep::fmt::Display::fmt (a)
|
dep::Fmt (v)
|
||||||
|
dep::fmt (t)
|
||||||
dep::fmt::Display (t)
|
dep::fmt::Display (t)
|
||||||
|
dep::fmt::Display::fmt (a)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1003,10 +1006,10 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("fmt".to_string()).name_only(),
|
Query::new("fmt".to_string()).name_only(),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::Fmt (v)
|
|
||||||
dep::Fmt (m)
|
dep::Fmt (m)
|
||||||
dep::Fmt (t)
|
dep::Fmt (t)
|
||||||
|
dep::Fmt (v)
|
||||||
|
dep::fmt (t)
|
||||||
dep::fmt::Display::fmt (a)
|
dep::fmt::Display::fmt (a)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
@ -1027,10 +1030,10 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("FMT".to_string()),
|
Query::new("FMT".to_string()),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::FMT (v)
|
|
||||||
dep::fmt (v)
|
|
||||||
dep::FMT (t)
|
dep::FMT (t)
|
||||||
|
dep::FMT (v)
|
||||||
|
dep::fmt (t)
|
||||||
|
dep::fmt (v)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -1068,10 +1071,10 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("".to_string()).limit(2),
|
Query::new("".to_string()).limit(2),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
dep::Fmt (m)
|
||||||
dep::Fmt (t)
|
dep::Fmt (t)
|
||||||
dep::Fmt (v)
|
dep::Fmt (v)
|
||||||
dep::Fmt (m)
|
dep::fmt (t)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1091,10 +1094,10 @@ mod tests {
|
||||||
"main",
|
"main",
|
||||||
Query::new("FMT".to_string()),
|
Query::new("FMT".to_string()),
|
||||||
expect![[r#"
|
expect![[r#"
|
||||||
dep::fmt (t)
|
|
||||||
dep::FMT (v)
|
|
||||||
dep::fmt (v)
|
|
||||||
dep::FMT (t)
|
dep::FMT (t)
|
||||||
|
dep::FMT (v)
|
||||||
|
dep::fmt (t)
|
||||||
|
dep::fmt (v)
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue