mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
internal: move test
This commit is contained in:
parent
59c86ff300
commit
959da8caa1
3 changed files with 36 additions and 24 deletions
|
@ -209,29 +209,6 @@ fn test_expr_order() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_group_pattern_by_separator_token() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($ ($ i:ident),*) => ($ (
|
||||
mod $ i {}
|
||||
)*);
|
||||
($ ($ i:ident)#*) => ($ (
|
||||
fn $ i() {}
|
||||
)*);
|
||||
($ i:ident ,# $ j:ident) => (
|
||||
struct $ i;
|
||||
struct $ j;
|
||||
)
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items("foo! { foo, bar }", "mod foo {} mod bar {}")
|
||||
.assert_expand_items("foo! { foo# bar }", "fn foo () {} fn bar () {}")
|
||||
.assert_expand_items("foo! { Foo,# Bar }", "struct Foo ; struct Bar ;");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_group_pattern_with_multiple_defs() {
|
||||
parse_macro(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue