File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1389,14 +1389,17 @@ mod tests {
1389
1389
1390
1390
#[ test]
1391
1391
fn test_numbers ( ) {
1392
- let source = "0x2f 0b1101 0 123 123_45_67_890 0.2 2j 2.2j" ;
1392
+ let source = "0x2f 0o12 0b1101 0 123 123_45_67_890 0.2 1e+2 2.1e3 2j 2.2j" ;
1393
1393
let tokens = lex_source ( source) ;
1394
1394
assert_eq ! (
1395
1395
tokens,
1396
1396
vec![
1397
1397
Tok :: Int {
1398
1398
value: BigInt :: from( 47 ) ,
1399
1399
} ,
1400
+ Tok :: Int {
1401
+ value: BigInt :: from( 10 )
1402
+ } ,
1400
1403
Tok :: Int {
1401
1404
value: BigInt :: from( 13 ) ,
1402
1405
} ,
@@ -1410,6 +1413,8 @@ mod tests {
1410
1413
value: BigInt :: from( 1234567890 ) ,
1411
1414
} ,
1412
1415
Tok :: Float { value: 0.2 } ,
1416
+ Tok :: Float { value: 100.0 } ,
1417
+ Tok :: Float { value: 2100.0 } ,
1413
1418
Tok :: Complex {
1414
1419
real: 0.0 ,
1415
1420
imag: 2.0 ,
You can’t perform that action at this time.
0 commit comments