From f273995a258bea08aead0efc46883d632270d9c4 Mon Sep 17 00:00:00 2001 From: yugo-horie Date: Sat, 16 Jan 2021 13:30:26 +0900 Subject: Swap assert_eq_text\!(expected, actual) --- crates/proc_macro_srv/src/tests/mod.rs | 8 ++++---- crates/proc_macro_srv/src/tests/utils.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/proc_macro_srv/src') diff --git a/crates/proc_macro_srv/src/tests/mod.rs b/crates/proc_macro_srv/src/tests/mod.rs index 1a827cbd7..fd54f8dfd 100644 --- a/crates/proc_macro_srv/src/tests/mod.rs +++ b/crates/proc_macro_srv/src/tests/mod.rs @@ -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 ); } diff --git a/crates/proc_macro_srv/src/tests/utils.rs b/crates/proc_macro_srv/src/tests/utils.rs index 36942147d..196abb8fc 100644 --- a/crates/proc_macro_srv/src/tests/utils.rs +++ b/crates/proc_macro_srv/src/tests/utils.rs @@ -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 { -- cgit v1.2.3