mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
move test
This commit is contained in:
parent
f4ee0d736c
commit
5ecda802f1
2 changed files with 23 additions and 21 deletions
|
@ -181,24 +181,3 @@ fn convert_leaf(leaf: &tt::Leaf) -> TtToken {
|
|||
tt::Leaf::Punct(punct) => convert_punct(*punct),
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::{convert_literal, TtToken};
|
||||
use parser::Token;
|
||||
use syntax::{SmolStr, SyntaxKind};
|
||||
|
||||
#[test]
|
||||
fn test_negative_literal() {
|
||||
assert_eq!(
|
||||
convert_literal(&tt::Literal {
|
||||
id: tt::TokenId::unspecified(),
|
||||
text: SmolStr::new("-42.0")
|
||||
}),
|
||||
TtToken {
|
||||
tt: Token { kind: SyntaxKind::FLOAT_NUMBER, is_jointed_to_next: false },
|
||||
text: SmolStr::new("-42.0")
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue