move test
This commit is contained in:
parent
748e6881fc
commit
7d92b9f6ff
@ -1272,3 +1272,21 @@ const VALUE: i32 = -1;
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_boolean_is_ident() {
|
||||
check(
|
||||
r#"
|
||||
macro_rules! m {
|
||||
($lit0:literal, $lit1:literal) => { const VALUE: (bool, bool) = ($lit0, $lit1); };
|
||||
}
|
||||
m!(true, false);
|
||||
"#,
|
||||
expect![[r#"
|
||||
macro_rules! m {
|
||||
($lit0:literal, $lit1:literal) => { const VALUE: (bool, bool) = ($lit0, $lit1); };
|
||||
}
|
||||
const VALUE: (bool, bool) = (true , false );
|
||||
"#]],
|
||||
);
|
||||
}
|
||||
|
@ -101,36 +101,6 @@ fn test_attr_to_token_tree() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_boolean_is_ident() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! foo {
|
||||
($lit0:literal, $lit1:literal) => { const VALUE: (bool,bool) = ($lit0,$lit1); };
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.assert_expand(
|
||||
r#"foo!(true,false);"#,
|
||||
r#"
|
||||
SUBTREE $
|
||||
IDENT const 14
|
||||
IDENT VALUE 15
|
||||
PUNCH : [alone] 16
|
||||
SUBTREE () 17
|
||||
IDENT bool 18
|
||||
PUNCH , [alone] 19
|
||||
IDENT bool 20
|
||||
PUNCH = [alone] 21
|
||||
SUBTREE () 22
|
||||
IDENT true 29
|
||||
PUNCH , [joint] 25
|
||||
IDENT false 31
|
||||
PUNCH ; [alone] 28
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_vis() {
|
||||
parse_macro(
|
||||
|
Loading…
x
Reference in New Issue
Block a user