]> Savannah Git Hosting - gnulib.git/commitdiff
vasprintf-posix-tests: allow rounding 1.5 to 1.
authorGary V. Vaughan <gary@gnu.org>
Sat, 9 Mar 2013 04:07:30 +0000 (11:07 +0700)
committerGary V. Vaughan <gary@gnu.org>
Sat, 9 Mar 2013 04:07:30 +0000 (11:07 +0700)
* tests/test-vasprintf-posix.c (test_function): Don't insist on
round-to-even, since POSIX says rounding is implementation-defined
and OS X 10.8.2 rounds 1.5 to 1 here.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
ChangeLog
tests/test-vasprintf-posix.c

index ef4944532207c351fb52fe274e9d493b5e327ede..3308526f4c551777e04113ef3ac92b7f2c52854c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2013-03-09  Gary V. Vaughan  <gary@gnu.org>
+
+       vasprintf-posix-tests: allow rounding 1.5 to 1, per the previous
+       changeset.
+       * tests/test-vasprintf-posix.c (test_function): Don't insist on
+       round-to-even, since POSIX says rounding is implementation-defined
+       and OS X 10.8.2 rounds 1.5 to 1 here.
+
 2013-03-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        vasnprintf-posix-tests: allow rounding 1.5 to 1
index 503d32692ed2bc018139d35bb42b9e757c9401d9..fc38bc3dbb6515c25a2545764320dadd2a9fbf86 100644 (file)
@@ -232,7 +232,8 @@ test_function (int (*my_asprintf) (char **, const char *, ...))
     int retval =
       my_asprintf (&result, "%.0a %d", 1.5, 33, 44, 55);
     ASSERT (result != NULL);
-    ASSERT (strcmp (result, "0x2p+0 33") == 0
+    ASSERT (strcmp (result, "0x1p+0 33") == 0
+            || strcmp (result, "0x2p+0 33") == 0
             || strcmp (result, "0x3p-1 33") == 0
             || strcmp (result, "0x6p-2 33") == 0
             || strcmp (result, "0xcp-3 33") == 0);