mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
internal: more macro tests
This commit is contained in:
parent
7de4b964a9
commit
7989d567e2
5 changed files with 76 additions and 22 deletions
|
@ -129,6 +129,25 @@ fn macro_items() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn macro_pattern() {
|
||||
check(
|
||||
TopEntryPoint::Pattern,
|
||||
"Some(_)",
|
||||
expect![[r#"
|
||||
TUPLE_STRUCT_PAT
|
||||
PATH
|
||||
PATH_SEGMENT
|
||||
NAME_REF
|
||||
IDENT "Some"
|
||||
L_PAREN "("
|
||||
WILDCARD_PAT
|
||||
UNDERSCORE "_"
|
||||
R_PAREN ")"
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
fn check(entry: TopEntryPoint, input: &str, expect: expect_test::Expect) {
|
||||
let (parsed, _errors) = super::parse(entry, input);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue