Always print floats with a decimal point with the Debug formatter
This commit is contained in:
parent
b058dc0107
commit
3e98f18280
3 changed files with 15 additions and 10 deletions
|
|
@ -158,8 +158,8 @@ pub fn main() {
|
|||
|
||||
// Float edge cases
|
||||
t!(format!("{}", -0.0), "0");
|
||||
t!(format!("{:?}", -0.0), "-0");
|
||||
t!(format!("{:?}", 0.0), "0");
|
||||
t!(format!("{:?}", -0.0), "-0.0");
|
||||
t!(format!("{:?}", 0.0), "0.0");
|
||||
|
||||
// sign aware zero padding
|
||||
t!(format!("{:<3}", 1), "1 ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue