mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
internal: move test
This commit is contained in:
parent
993ff1c239
commit
0a32c20142
2 changed files with 21 additions and 14 deletions
|
@ -475,3 +475,24 @@ struct Bar {
|
||||||
"#]],
|
"#]],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_two_idents() {
|
||||||
|
check(
|
||||||
|
r#"
|
||||||
|
macro_rules! m {
|
||||||
|
($i:ident, $j:ident) => { fn foo() { let a = $i; let b = $j; } }
|
||||||
|
}
|
||||||
|
m! { foo, bar }
|
||||||
|
"#,
|
||||||
|
expect![[r#"
|
||||||
|
macro_rules! m {
|
||||||
|
($i:ident, $j:ident) => { fn foo() { let a = $i; let b = $j; } }
|
||||||
|
}
|
||||||
|
fn foo() {
|
||||||
|
let a = foo;
|
||||||
|
let b = bar;
|
||||||
|
}
|
||||||
|
"#]],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
@ -107,20 +107,6 @@ fn test_attr_to_token_tree() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_two_idents() {
|
|
||||||
parse_macro(
|
|
||||||
r#"
|
|
||||||
macro_rules! foo {
|
|
||||||
($ i:ident, $ j:ident) => {
|
|
||||||
fn foo() { let a = $ i; let b = $j; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
"#,
|
|
||||||
)
|
|
||||||
.assert_expand_items("foo! { foo, bar }", "fn foo () {let a = foo ; let b = bar ;}");
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_tt_to_stmts() {
|
fn test_tt_to_stmts() {
|
||||||
let stmts = parse_macro(
|
let stmts = parse_macro(
|
||||||
|
|
Loading…
Reference in a new issue