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.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index 1dba82915..5e6a090aa 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -825,6 +825,19 @@ fn test_tt_group() {
825 ) 825 )
826 .assert_expand_items(r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#); 826 .assert_expand_items(r#"foo! { fn foo() {} }"#, r#"fn foo () {}"#);
827} 827}
828
829#[test]
830fn test_tt_composite() {
831 parse_macro(
832 r#"
833 macro_rules! foo {
834 ($i:tt) => { 0 }
835 }
836 "#,
837 )
838 .assert_expand_items(r#"foo! { => }"#, r#"0"#);
839}
840
828#[test] 841#[test]
829fn test_lifetime() { 842fn test_lifetime() {
830 parse_macro( 843 parse_macro(