internal: move some tests

This commit is contained in:
Aleksey Kladov 2021-10-09 18:18:56 +03:00
parent a060b9a4b2
commit 3e8ef943c6
3 changed files with 38 additions and 22 deletions

View file

@ -71,28 +71,6 @@ macro_rules! foobar {
assert_eq!(get_text(tt::TokenId(13), T!['{']), "{");
}
#[test]
fn test_match_group_with_multichar_sep() {
parse_macro(
r#"
macro_rules! foo {
(fn $name:ident {$($i:literal)*} ) => ( fn $name() -> bool { $($i)&&*} );
}"#,
)
.assert_expand_items("foo! (fn baz {true true} );", "fn baz () -> bool {true &&true}");
}
#[test]
fn test_match_group_with_multichar_sep2() {
parse_macro(
r#"
macro_rules! foo {
(fn $name:ident {$($i:literal)&&*} ) => ( fn $name() -> bool { $($i)&&*} );
}"#,
)
.assert_expand_items("foo! (fn baz {true && true} );", "fn baz () -> bool {true &&true}");
}
#[test]
fn test_match_group_zero_match() {
parse_macro(