mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
internal: move tests
This commit is contained in:
parent
0dc87badd7
commit
e838da18a9
2 changed files with 33 additions and 28 deletions
|
@ -107,34 +107,6 @@ fn test_attr_to_token_tree() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_match_literal() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
('(') => {
|
||||
fn foo() {}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items("foo! ['('];", "fn foo () {}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_macro_def_simple() {
|
||||
cov_mark::check!(parse_macro_def_simple);
|
||||
|
||||
parse_macro2(
|
||||
r#"
|
||||
macro foo($id:ident) {
|
||||
fn $id() {}
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items("foo!(bar);", "fn bar () {}");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_parse_macro_def_rules() {
|
||||
cov_mark::check!(parse_macro_def_rules);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue