diff options
Diffstat (limited to 'crates/mbe/src')
-rw-r--r-- | crates/mbe/src/tests.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 9ff901e97..bd2977ebd 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs | |||
@@ -261,7 +261,6 @@ fn test_expr_order() { | |||
261 | 261 | ||
262 | let dump = format!("{:#?}", expanded); | 262 | let dump = format!("{:#?}", expanded); |
263 | assert_eq_text!( | 263 | assert_eq_text!( |
264 | dump.trim(), | ||
265 | r#"MACRO_ITEMS@0..15 | 264 | r#"MACRO_ITEMS@0..15 |
266 | FN@0..15 | 265 | FN@0..15 |
267 | FN_KW@0..2 "fn" | 266 | FN_KW@0..2 "fn" |
@@ -285,6 +284,7 @@ fn test_expr_order() { | |||
285 | INT_NUMBER@12..13 "2" | 284 | INT_NUMBER@12..13 "2" |
286 | SEMICOLON@13..14 ";" | 285 | SEMICOLON@13..14 ";" |
287 | R_CURLY@14..15 "}""#, | 286 | R_CURLY@14..15 "}""#, |
287 | dump.trim() | ||
288 | ); | 288 | ); |
289 | } | 289 | } |
290 | 290 | ||
@@ -989,7 +989,6 @@ fn test_tt_composite2() { | |||
989 | 989 | ||
990 | let res = format!("{:#?}", &node); | 990 | let res = format!("{:#?}", &node); |
991 | assert_eq_text!( | 991 | assert_eq_text!( |
992 | res.trim(), | ||
993 | r###"MACRO_ITEMS@0..10 | 992 | r###"MACRO_ITEMS@0..10 |
994 | MACRO_CALL@0..10 | 993 | MACRO_CALL@0..10 |
995 | PATH@0..3 | 994 | PATH@0..3 |
@@ -1003,7 +1002,8 @@ fn test_tt_composite2() { | |||
1003 | R_ANGLE@6..7 ">" | 1002 | R_ANGLE@6..7 ">" |
1004 | WHITESPACE@7..8 " " | 1003 | WHITESPACE@7..8 " " |
1005 | POUND@8..9 "#" | 1004 | POUND@8..9 "#" |
1006 | R_PAREN@9..10 ")""### | 1005 | R_PAREN@9..10 ")""###, |
1006 | res.trim() | ||
1007 | ); | 1007 | ); |
1008 | } | 1008 | } |
1009 | 1009 | ||
@@ -1742,7 +1742,7 @@ impl MacroFixture { | |||
1742 | fn assert_expand(&self, invocation: &str, expected: &str) { | 1742 | fn assert_expand(&self, invocation: &str, expected: &str) { |
1743 | let expansion = self.expand_tt(invocation); | 1743 | let expansion = self.expand_tt(invocation); |
1744 | let actual = format!("{:?}", expansion); | 1744 | let actual = format!("{:?}", expansion); |
1745 | test_utils::assert_eq_text!(&actual.trim(), &expected.trim()); | 1745 | test_utils::assert_eq_text!(&expected.trim(), &actual.trim()); |
1746 | } | 1746 | } |
1747 | 1747 | ||
1748 | fn assert_expand_items(&self, invocation: &str, expected: &str) -> &MacroFixture { | 1748 | fn assert_expand_items(&self, invocation: &str, expected: &str) -> &MacroFixture { |
@@ -1941,7 +1941,6 @@ fn test_no_space_after_semi_colon() { | |||
1941 | 1941 | ||
1942 | let dump = format!("{:#?}", expanded); | 1942 | let dump = format!("{:#?}", expanded); |
1943 | assert_eq_text!( | 1943 | assert_eq_text!( |
1944 | dump.trim(), | ||
1945 | r###"MACRO_ITEMS@0..52 | 1944 | r###"MACRO_ITEMS@0..52 |
1946 | MODULE@0..26 | 1945 | MODULE@0..26 |
1947 | ATTR@0..21 | 1946 | ATTR@0..21 |
@@ -1981,6 +1980,7 @@ fn test_no_space_after_semi_colon() { | |||
1981 | NAME@50..51 | 1980 | NAME@50..51 |
1982 | IDENT@50..51 "f" | 1981 | IDENT@50..51 "f" |
1983 | SEMICOLON@51..52 ";""###, | 1982 | SEMICOLON@51..52 ";""###, |
1983 | dump.trim() | ||
1984 | ); | 1984 | ); |
1985 | } | 1985 | } |
1986 | 1986 | ||