mirror of
https://github.com/RustPython/Parser.git
synced 2025-07-13 08:05:17 +00:00
Add test
This commit is contained in:
parent
96a50810a6
commit
1eeddb521e
1 changed files with 6 additions and 1 deletions
|
@ -1389,7 +1389,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
fn test_numbers() {
|
||||
let source = "0x2f 0b1101 0 123 123_45_67_890 0.2 2j 2.2j";
|
||||
let source = "0x2f 0o12 0b1101 0 123 123_45_67_890 0.2 1e+2 2.1e3 2j 2.2j";
|
||||
let tokens = lex_source(source);
|
||||
assert_eq!(
|
||||
tokens,
|
||||
|
@ -1397,6 +1397,9 @@ mod tests {
|
|||
Tok::Int {
|
||||
value: BigInt::from(47),
|
||||
},
|
||||
Tok::Int {
|
||||
value: BigInt::from(10)
|
||||
},
|
||||
Tok::Int {
|
||||
value: BigInt::from(13),
|
||||
},
|
||||
|
@ -1410,6 +1413,8 @@ mod tests {
|
|||
value: BigInt::from(1234567890),
|
||||
},
|
||||
Tok::Float { value: 0.2 },
|
||||
Tok::Float { value: 100.0 },
|
||||
Tok::Float { value: 2100.0 },
|
||||
Tok::Complex {
|
||||
real: 0.0,
|
||||
imag: 2.0,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue