File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -258,15 +258,22 @@ fn literal_integer() {
258
258
assert_eq ! ( Literal :: i64_unsuffixed( 10 ) . to_string( ) , "10" ) ;
259
259
assert_eq ! ( Literal :: i128_unsuffixed( 10 ) . to_string( ) , "10" ) ;
260
260
assert_eq ! ( Literal :: isize_unsuffixed( 10 ) . to_string( ) , "10" ) ;
261
+
262
+ assert_eq ! ( Literal :: i32_suffixed( -10 ) . to_string( ) , "-10i32" ) ;
263
+ assert_eq ! ( Literal :: i32_unsuffixed( -10 ) . to_string( ) , "-10" ) ;
261
264
}
262
265
263
266
#[ test]
264
267
fn literal_float ( ) {
265
268
assert_eq ! ( Literal :: f32_suffixed( 10.0 ) . to_string( ) , "10f32" ) ;
269
+ assert_eq ! ( Literal :: f32_suffixed( -10.0 ) . to_string( ) , "-10f32" ) ;
266
270
assert_eq ! ( Literal :: f64_suffixed( 10.0 ) . to_string( ) , "10f64" ) ;
271
+ assert_eq ! ( Literal :: f64_suffixed( -10.0 ) . to_string( ) , "-10f64" ) ;
267
272
268
273
assert_eq ! ( Literal :: f32_unsuffixed( 10.0 ) . to_string( ) , "10.0" ) ;
274
+ assert_eq ! ( Literal :: f32_unsuffixed( -10.0 ) . to_string( ) , "-10.0" ) ;
269
275
assert_eq ! ( Literal :: f64_unsuffixed( 10.0 ) . to_string( ) , "10.0" ) ;
276
+ assert_eq ! ( Literal :: f64_unsuffixed( -10.0 ) . to_string( ) , "-10.0" ) ;
270
277
}
271
278
272
279
#[ test]
You can’t perform that action at this time.
0 commit comments