diff options
author | das <das@FreeBSD.org> | 2003-04-19 23:53:34 +0000 |
---|---|---|
committer | das <das@FreeBSD.org> | 2003-04-19 23:53:34 +0000 |
commit | 3214ca63eafd5a8ddcc943aa3208168b767c77ba (patch) | |
tree | 2cc99db71a666be5f4afa45b693103d191375fab /tools/regression/lib/libc | |
parent | 30c051657aa8331d42378a009a8371c2102a33eb (diff) | |
download | FreeBSD-src-3214ca63eafd5a8ddcc943aa3208168b767c77ba.zip FreeBSD-src-3214ca63eafd5a8ddcc943aa3208168b767c77ba.tar.gz |
Add a dozen new tests with the general theme of getting trailing
zeroes right.
Diffstat (limited to 'tools/regression/lib/libc')
-rw-r--r-- | tools/regression/lib/libc/stdio/test-printfloat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/regression/lib/libc/stdio/test-printfloat.c b/tools/regression/lib/libc/stdio/test-printfloat.c index e12d3a6..bc1e533 100644 --- a/tools/regression/lib/libc/stdio/test-printfloat.c +++ b/tools/regression/lib/libc/stdio/test-printfloat.c @@ -141,6 +141,18 @@ main(int argc, char *argv[]) testfmt("314159", "%g", 3.14159e5); testfmt("314159.", "%#g", 3.14159e5); + testfmt(" 9.000000e+03", "%13e", 9000.0); + testfmt(" 9000.000000", "%12f", 9000.0); + testfmt(" 9000", "%5g", 9000.0); + testfmt(" 900000.", "%#8g", 900000.0); + testfmt(" 9e+06", "%6g", 9000000.0); + testfmt(" 9.000000e-04", "%13e", 0.0009); + testfmt(" 0.000900", "%9f", 0.0009); + testfmt(" 0.0009", "%7g", 0.0009); + testfmt(" 9e-05", "%6g", 0.00009); + testfmt(" 9.00000e-05", "%#12g", 0.00009); + testfmt(" 9.e-05", "%#7.1g", 0.00009); + testfmt(" 0.0", "%4.1f", 0.0); testfmt("90.0", "%4.1f", 90.0); testfmt(" 100", "%4.0f", 100.0); |