Always print floats with a decimal point with the Debug formatter

This commit is contained in:
Diggory Blake 2017-12-18 23:16:00 +00:00
parent b058dc0107
commit 3e98f18280
3 changed files with 15 additions and 10 deletions

View file

@ -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 ");