diff options
author | 2005-03-09 09:29:47 +0000 | |
---|---|---|
committer | 2005-03-09 09:29:47 +0000 | |
commit | 0ccfa65f6c3d5f4e9ef3c4aa81a03fb91f801dda (patch) | |
tree | 25b2c0ea13f99c3afa3f4149cba7c74b429e519b | |
parent | Fix rounding of fractionless numbers. ok tom@ miod@ (diff) | |
download | wireguard-openbsd-0ccfa65f6c3d5f4e9ef3c4aa81a03fb91f801dda.tar.xz wireguard-openbsd-0ccfa65f6c3d5f4e9ef3c4aa81a03fb91f801dda.zip |
Now that rounding is done properly for fractionless numbers, fix the
regression cases and add a few too.
-rw-r--r-- | regress/lib/libutil/fmt_scaled/fmt_test.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/regress/lib/libutil/fmt_scaled/fmt_test.c b/regress/lib/libutil/fmt_scaled/fmt_test.c index e5e957088ea..91629b12b17 100644 --- a/regress/lib/libutil/fmt_scaled/fmt_test.c +++ b/regress/lib/libutil/fmt_scaled/fmt_test.c @@ -96,16 +96,18 @@ static struct { /* the test cases */ { 1786, "1.7K", 0 }, { 1800, "1.8K", 0 }, { 2000, "2.0K", 0 }, - { 123456, "120K", 0 }, + { 123456, "121K", 0 }, + { 578318, "565K", 0 }, + { 902948, "882K", 0 }, { 1048576, "1.0M", 0}, { 1048628, "1.0M", 0}, { 1049447, "1.0M", 0}, { -102400, "-100K", 0}, { -103423, "-101K", 0 }, { 7299072, "7.0M", 0 }, - { 409478144L, "390M", 0 }, - { -409478144L, "-390M", 0 }, - { 999999999L, "953M", 0 }, + { 409478144L, "391M", 0 }, + { -409478144L, "-391M", 0 }, + { 999999999L, "954M", 0 }, { 1499999999L, "1.4G", 0 }, { 12475423744LL, "11.6G", 0}, { 1LL<<61, "2.0E", 0 }, |