mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
move some tests
This commit is contained in:
parent
cb1b6a273f
commit
036c0ff8c7
3 changed files with 66 additions and 43 deletions
|
@ -209,48 +209,6 @@ fn test_expr_order() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_group_pattern_with_multiple_defs() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($ ($ i:ident),*) => ( struct Bar { $ (
|
||||
fn $ i {}
|
||||
)*} );
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items("foo! { foo, bar }", "struct Bar {fn foo {} fn bar {}}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_group_pattern_with_multiple_statement() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($ ($ i:ident),*) => ( fn baz { $ (
|
||||
$ i ();
|
||||
)*} );
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items("foo! { foo, bar }", "fn baz {foo () ; bar () ;}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_group_pattern_with_multiple_statement_without_semi() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($ ($ i:ident),*) => ( fn baz { $ (
|
||||
$i()
|
||||
);*} );
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items("foo! { foo, bar }", "fn baz {foo () ;bar ()}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_group_empty_fixed_token() {
|
||||
parse_macro(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue