aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/tests.rs')
-rw-r--r--crates/ra_mbe/src/tests.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index 38a31109d..9151b6ecd 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -412,7 +412,7 @@ fn test_expand_to_item_list() {
412 let expansion = expand(&rules, "structs!(Foo, Bar);"); 412 let expansion = expand(&rules, "structs!(Foo, Bar);");
413 let tree = token_tree_to_macro_items(&expansion).unwrap().tree(); 413 let tree = token_tree_to_macro_items(&expansion).unwrap().tree();
414 assert_eq!( 414 assert_eq!(
415 tree.syntax().debug_dump().trim(), 415 format!("{:#?}", tree.syntax()).trim(),
416 r#" 416 r#"
417MACRO_ITEMS@[0; 40) 417MACRO_ITEMS@[0; 40)
418 STRUCT_DEF@[0; 20) 418 STRUCT_DEF@[0; 20)
@@ -531,7 +531,7 @@ fn test_tt_to_stmts() {
531 let stmts = token_tree_to_macro_stmts(&expanded).unwrap().tree(); 531 let stmts = token_tree_to_macro_stmts(&expanded).unwrap().tree();
532 532
533 assert_eq!( 533 assert_eq!(
534 stmts.syntax().debug_dump().trim(), 534 format!("{:#?}", stmts.syntax()).trim(),
535 r#"MACRO_STMTS@[0; 15) 535 r#"MACRO_STMTS@[0; 15)
536 LET_STMT@[0; 7) 536 LET_STMT@[0; 7)
537 LET_KW@[0; 3) "let" 537 LET_KW@[0; 3) "let"
@@ -669,7 +669,7 @@ fn test_expr_order() {
669 ); 669 );
670 670
671 assert_eq!( 671 assert_eq!(
672 expand_to_items(&rules, "foo! { 1 + 1 }").syntax().debug_dump().trim(), 672 format!("{:#?}", expand_to_items(&rules, "foo! { 1 + 1 }").syntax()).trim(),
673 r#"MACRO_ITEMS@[0; 15) 673 r#"MACRO_ITEMS@[0; 15)
674 FN_DEF@[0; 15) 674 FN_DEF@[0; 15)
675 FN_KW@[0; 2) "fn" 675 FN_KW@[0; 2) "fn"
@@ -1013,7 +1013,7 @@ fn test_vec() {
1013 ); 1013 );
1014 1014
1015 assert_eq!( 1015 assert_eq!(
1016 expand_to_expr(&rules, r#"vec![1u32,2];"#).syntax().debug_dump().trim(), 1016 format!("{:#?}", expand_to_expr(&rules, r#"vec![1u32,2];"#).syntax()).trim(),
1017 r#"BLOCK_EXPR@[0; 45) 1017 r#"BLOCK_EXPR@[0; 45)
1018 BLOCK@[0; 45) 1018 BLOCK@[0; 45)
1019 L_CURLY@[0; 1) "{" 1019 L_CURLY@[0; 1) "{"