aboutsummaryrefslogtreecommitdiff
path: root/stdlib/tst-strtod.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-07-25 03:31:54 +0000
committerUlrich Drepper <drepper@redhat.com>2004-07-25 03:31:54 +0000
commitdeddf8092de80946261279dd9669a801c24aad81 (patch)
treebaf9e282f473865d7d24d38434a1dadd2c138818 /stdlib/tst-strtod.c
parent15ef4b555f5bef9bbcb39bf72f8399d77e57afff (diff)
downloadglibc-deddf8092de80946261279dd9669a801c24aad81.zip
glibc-deddf8092de80946261279dd9669a801c24aad81.tar.gz
glibc-deddf8092de80946261279dd9669a801c24aad81.tar.bz2
[BZ #274]
Update. 2004-07-21 Jakub Jelinek <jakub@redhat.com> [BZ #274] * stdlib/strtod_l.c (INTERNAL (__STRTOF)): Fix used >= BITS_PER_MP_LIMB shifting up. * stdlib/tst-strtod.c (main): Add new tests.
Diffstat (limited to 'stdlib/tst-strtod.c')
-rw-r--r--stdlib/tst-strtod.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index f9ab583..628e40c 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.c
@@ -157,6 +157,21 @@ main (int argc, char ** argv)
status = 1;
}
+ static struct { const char *str; long double l; } ltests[] =
+ {
+ { "42.0000000000000000001", 42.0000000000000000001L },
+ { "42.00000000000000000001", 42.00000000000000000001L },
+ { "42.000000000000000000001", 42.000000000000000000001L }
+ };
+ int n;
+ for (n = 0; n < sizeof (ltests) / sizeof (ltests[0]); ++n)
+ if (strtold (ltests[n].str, NULL) != ltests[n].l)
+ {
+ printf ("ltests[%d]: %La != %La\n", n,
+ strtold (ltests[n].str, NULL), ltests[n].l);
+ status = 1;
+ }
+
status |= long_dbl ();
status |= locale_test ();