move tests
This commit is contained in:
parent
6fd2f1d25b
commit
748e6881fc
3 changed files with 40 additions and 28 deletions
|
|
@ -101,27 +101,6 @@ fn test_attr_to_token_tree() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_literal() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($ type:ty , $ lit:literal) => { const VALUE: $ type = $ lit;};
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items(r#"foo!(u8,0);"#, r#"const VALUE : u8 = 0 ;"#);
|
||||
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($ type:ty , $ lit:literal) => { const VALUE: $ type = $ lit;};
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand_items(r#"foo!(i32,-1);"#, r#"const VALUE : i32 = - 1 ;"#);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_boolean_is_ident() {
|
||||
parse_macro(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue