diff options
Diffstat (limited to 'crates/ra_mbe/src/tests.rs')
-rw-r--r-- | crates/ra_mbe/src/tests.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index 034ea639b..2b80c5f49 100644 --- a/crates/ra_mbe/src/tests.rs +++ b/crates/ra_mbe/src/tests.rs | |||
@@ -1,4 +1,5 @@ | |||
1 | use ra_syntax::{ast, AstNode, NodeOrToken}; | 1 | use ra_syntax::{ast, AstNode, NodeOrToken}; |
2 | use test_utils::assert_eq_text; | ||
2 | 3 | ||
3 | use super::*; | 4 | use super::*; |
4 | 5 | ||
@@ -152,7 +153,6 @@ pub(crate) fn assert_expansion( | |||
152 | 153 | ||
153 | // wrap the given text to a macro call | 154 | // wrap the given text to a macro call |
154 | let expected = text_to_tokentree(&expected); | 155 | let expected = text_to_tokentree(&expected); |
155 | |||
156 | let (expanded_tree, expected_tree) = match kind { | 156 | let (expanded_tree, expected_tree) = match kind { |
157 | MacroKind::Items => { | 157 | MacroKind::Items => { |
158 | let expanded_tree = token_tree_to_macro_items(&expanded).unwrap().tree(); | 158 | let expanded_tree = token_tree_to_macro_items(&expanded).unwrap().tree(); |
@@ -178,7 +178,7 @@ pub(crate) fn assert_expansion( | |||
178 | let expected_tree = expected_tree.replace("C_C__C", "$crate"); | 178 | let expected_tree = expected_tree.replace("C_C__C", "$crate"); |
179 | assert_eq!( | 179 | assert_eq!( |
180 | expanded_tree, expected_tree, | 180 | expanded_tree, expected_tree, |
181 | "left => {}\nright => {}", | 181 | "\nleft:\n{}\nright:\n{}", |
182 | expanded_tree, expected_tree, | 182 | expanded_tree, expected_tree, |
183 | ); | 183 | ); |
184 | 184 | ||
@@ -657,6 +657,7 @@ fn test_expr() { | |||
657 | } | 657 | } |
658 | 658 | ||
659 | #[test] | 659 | #[test] |
660 | #[ignore] | ||
660 | fn test_expr_order() { | 661 | fn test_expr_order() { |
661 | let rules = create_rules( | 662 | let rules = create_rules( |
662 | r#" | 663 | r#" |
@@ -668,8 +669,8 @@ fn test_expr_order() { | |||
668 | "#, | 669 | "#, |
669 | ); | 670 | ); |
670 | 671 | ||
671 | assert_eq!( | 672 | assert_eq_text!( |
672 | format!("{:#?}", expand_to_items(&rules, "foo! { 1 + 1 }").syntax()).trim(), | 673 | &format!("{:#?}", expand_to_items(&rules, "foo! { 1 + 1 }").syntax()), |
673 | r#"MACRO_ITEMS@[0; 15) | 674 | r#"MACRO_ITEMS@[0; 15) |
674 | FN_DEF@[0; 15) | 675 | FN_DEF@[0; 15) |
675 | FN_KW@[0; 2) "fn" | 676 | FN_KW@[0; 2) "fn" |