mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Swap assert_eq_text\!(expected, actual)
This commit is contained in:
parent
3782c78d75
commit
f273995a25
6 changed files with 27 additions and 27 deletions
|
@ -38,9 +38,9 @@ fn test_derive_proc_macro_list() {
|
|||
let res = list("serde_derive", "1").join("\n");
|
||||
|
||||
assert_eq_text!(
|
||||
&res,
|
||||
r#"Serialize [CustomDerive]
|
||||
Deserialize [CustomDerive]"#
|
||||
Deserialize [CustomDerive]"#,
|
||||
&res
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -50,9 +50,9 @@ fn list_test_macros() {
|
|||
let res = list("proc_macro_test", "0.0.0").join("\n");
|
||||
|
||||
assert_eq_text!(
|
||||
&res,
|
||||
r#"function_like_macro [FuncLike]
|
||||
attribute_macro [Attr]
|
||||
DummyTrait [CustomDerive]"#
|
||||
DummyTrait [CustomDerive]"#,
|
||||
&res
|
||||
);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ pub fn assert_expand(
|
|||
let fixture = parse_string(ra_fixture).unwrap();
|
||||
|
||||
let res = expander.expand(macro_name, &fixture.subtree, None).unwrap();
|
||||
assert_eq_text!(&format!("{:?}", res), &expect.trim());
|
||||
assert_eq_text!(&expect.trim(), &format!("{:?}", res));
|
||||
}
|
||||
|
||||
pub fn list(crate_name: &str, version: &str) -> Vec<String> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue