File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -3019,9 +3019,9 @@ mod tests {
3019
3019
let v: i64 = super :: decode ( "9223372036854775807" ) . unwrap ( ) ;
3020
3020
assert_eq ! ( v, i64 :: MAX ) ;
3021
3021
3022
- let res: DecodeResult < i64 > = super :: decode ( "765.25252 " ) ;
3022
+ let res: DecodeResult < i64 > = super :: decode ( "765.25 " ) ;
3023
3023
assert_eq ! ( res, Err ( ExpectedError ( "Integer" . to_string( ) ,
3024
- "765.25252 " . to_string( ) ) ) ) ;
3024
+ "765.25 " . to_string( ) ) ) ) ;
3025
3025
}
3026
3026
3027
3027
#[ test]
Original file line number Diff line number Diff line change @@ -139,10 +139,10 @@ pub fn main() {
139
139
t ! ( format!( "{:e}" , 1.2345e6f32 ) , "1.2345e6" ) ;
140
140
t ! ( format!( "{:e}" , 1.2345e6f64 ) , "1.2345e6" ) ;
141
141
t ! ( format!( "{:E}" , 1.2345e6f64 ) , "1.2345E6" ) ;
142
- t ! ( format!( "{:.3e}" , 1.2345e6f64 ) , "1.234e6 " ) ;
143
- t ! ( format!( "{:10.3e}" , 1.2345e6f64 ) , " 1.234e6 " ) ;
144
- t ! ( format!( "{:+10.3e}" , 1.2345e6f64 ) , " +1.234e6 " ) ;
145
- t ! ( format!( "{:+10.3e}" , -1.2345e6f64 ) , " -1.234e6 " ) ;
142
+ t ! ( format!( "{:.3e}" , 1.2345e6f64 ) , "1.235e6 " ) ;
143
+ t ! ( format!( "{:10.3e}" , 1.2345e6f64 ) , " 1.235e6 " ) ;
144
+ t ! ( format!( "{:+10.3e}" , 1.2345e6f64 ) , " +1.235e6 " ) ;
145
+ t ! ( format!( "{:+10.3e}" , -1.2345e6f64 ) , " -1.235e6 " ) ;
146
146
147
147
// Float edge cases
148
148
t ! ( format!( "{}" , -0.0 ) , "0" ) ;
You can’t perform that action at this time.
0 commit comments