diff options
author | Edwin Cheng <[email protected]> | 2019-04-19 14:52:54 +0100 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2019-04-19 14:52:54 +0100 |
commit | 1afde29adbb6c9094babe117f7972f7157d16cc1 (patch) | |
tree | 74f3e778ad2553319dae0b862b440c2963255205 | |
parent | 763569017a61f5294750cdd0d4aee02d0bf76166 (diff) |
Add back missing assert
-rw-r--r-- | crates/ra_mbe/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs index 074be9043..814586fd6 100644 --- a/crates/ra_mbe/src/lib.rs +++ b/crates/ra_mbe/src/lib.rs | |||
@@ -209,6 +209,7 @@ impl_froms!(TokenTree: Leaf, Subtree); | |||
209 | 209 | ||
210 | pub(crate) fn assert_expansion(rules: &MacroRules, invocation: &str, expansion: &str) { | 210 | pub(crate) fn assert_expansion(rules: &MacroRules, invocation: &str, expansion: &str) { |
211 | let expanded = expand(rules, invocation); | 211 | let expanded = expand(rules, invocation); |
212 | assert_eq!(expanded.to_string(), expansion); | ||
212 | 213 | ||
213 | let tree = token_tree_to_macro_items(&expanded); | 214 | let tree = token_tree_to_macro_items(&expanded); |
214 | 215 | ||
@@ -807,7 +808,7 @@ MACRO_ITEMS@[0; 40) | |||
807 | } | 808 | } |
808 | "#, | 809 | "#, |
809 | ); | 810 | ); |
810 | assert_expansion(&rules, r#"foo!(u8 0)"#, r#"const VALUE: u8 = 0;"#); | 811 | assert_expansion(&rules, r#"foo!(u8 0)"#, r#"const VALUE : u8 = 0 ;"#); |
811 | } | 812 | } |
812 | 813 | ||
813 | #[test] | 814 | #[test] |
@@ -819,6 +820,6 @@ MACRO_ITEMS@[0; 40) | |||
819 | } | 820 | } |
820 | "#, | 821 | "#, |
821 | ); | 822 | ); |
822 | assert_expansion(&rules, r#"foo!(pub foo);"#, r#"pub fn foo() {}"#); | 823 | assert_expansion(&rules, r#"foo!(pub foo);"#, r#"pub fn foo () {}"#); |
823 | } | 824 | } |
824 | } | 825 | } |