summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-05-13 16:25:59 +0000
committerUlrich Drepper <drepper@redhat.com>1998-05-13 16:25:59 +0000
commit936365c1da8bb783a29c4f94c30b8099d8bdd4f7 (patch)
treeae5c80007eed30fb8aec3725a3ed57b8dd9e2dca
parent7eb759de39981a77059b94a58193e84bf6656a1e (diff)
downloadglibc-936365c1da8bb783a29c4f94c30b8099d8bdd4f7.tar.gz
glibc-936365c1da8bb783a29c4f94c30b8099d8bdd4f7.tar.xz
glibc-936365c1da8bb783a29c4f94c30b8099d8bdd4f7.zip
Update.
	* stdlib/tst-strtod.c: Add test for -0.0.
-rw-r--r--ChangeLog2
-rw-r--r--stdlib/tst-strtod.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ef83e4d57f..73b3bf146e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 1998-05-13  Ulrich Drepper  <drepper@cygnus.com>
 
+	* stdlib/tst-strtod.c: Add test for -0.0.
+
 	* io/ftwtest-sh: Prevent tests from being run by root.
 
 	* wcsmbs/wcsmbsload.c (extract_charset_name): Fix silly bugs in
diff --git a/stdlib/tst-strtod.c b/stdlib/tst-strtod.c
index 3cc907f2ac..bfc2481589 100644
--- a/stdlib/tst-strtod.c
+++ b/stdlib/tst-strtod.c
@@ -47,6 +47,7 @@ static void expand __P ((char *dst, int c));
 int
 main (int argc, char ** argv)
 {
+  char buf[100];
   register const struct ltest *lt;
   char *ep;
   int status = 0;
@@ -83,6 +84,13 @@ main (int argc, char ** argv)
 	}
     }
 
+  sprintf (buf, "%f", strtod ("-0.0", NULL));
+  if (strcmp (buf, "-0.000000") != 0)
+    {
+      printf ("  strtod (\"-0.0\', NULL) returns \"%s\"\n", buf);
+      status = 1;
+    }
+
   exit (status ? EXIT_FAILURE : EXIT_SUCCESS);
 }