diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-12-28 06:52:16 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2003-12-28 06:52:16 +0000 |
commit | 17db5ef2483eb1697f3b38794c472cb5278554e2 (patch) | |
tree | 2ab55b621d87295997520032c92673fa084b7a77 | |
parent | 4a7cf581554801aceff873e144c105234cab490f (diff) |
Add a few test cases.
ok ian@
-rw-r--r-- | regress/lib/libutil/fmt_scaled/fmt_test.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/regress/lib/libutil/fmt_scaled/fmt_test.c b/regress/lib/libutil/fmt_scaled/fmt_test.c index 0b7bf0ef577..e7816c20d6a 100644 --- a/regress/lib/libutil/fmt_scaled/fmt_test.c +++ b/regress/lib/libutil/fmt_scaled/fmt_test.c @@ -76,6 +76,10 @@ static struct { /* the test cases */ int errno; } ddata[] = { { 0, "0B", 0 }, + { 1, "1B", 0 }, + { -1, "-1B", 0 }, + { 100, "100B", 0}, + { -100, "-100B", 0}, { 999, "999B", 0 }, { 1000, "1000B", 0 }, { 1023, "1023B", 0 }, @@ -86,11 +90,15 @@ static struct { /* the test cases */ { -1234, "-1.2K", 0 }, { 1484, "1.4K", 0 }, /* rouding boundary, down */ { 1485, "1.5K", 0 }, /* rouding boundary, up */ + { -1484, "-1.4K", 0 }, /* rouding boundary, down */ + { -1485, "-1.5K", 0 }, /* rouding boundary, up */ { 1536, "1.5K", 0 }, { 1786, "1.7K", 0 }, { 1800, "1.8K", 0 }, { 2000, "2.0K", 0 }, { 123456, "120K", 0 }, + { -102400, "-100K", 0}, + { -103423, "-101K", 0 }, { 7299072, "7.0M", 0 }, { 409478144L, "390M", 0 }, { -409478144L, "-390M", 0 }, |