# HG changeset patch # User Gary V. Vaughan # Date 1362807056 -25200 # Node ID 35650a3443e8a465fe01f022dad4d60a58a7845e # Parent e2ab31f1979902979150eeb250995a10af3b13ec vasprintf-posix-tests: allow rounding 1.51 to 1. * 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.51 to 1 here. diff -r e2ab31f19799 -r 35650a3443e8 ChangeLog --- a/ChangeLog Sat Mar 09 11:07:30 2013 +0700 +++ b/ChangeLog Sat Mar 09 12:30:56 2013 +0700 @@ -1,5 +1,11 @@ 2013-03-09 Gary V. Vaughan + vasprintf-posix-tests: allow rounding 1.51 to 1, per the previous + changesets, but for the 'precision 0' test. + * 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.51 to 1 here. + vasprintf-posix-tests: allow rounding 1.5 to 1, per the previous changeset. * tests/test-vasprintf-posix.c (test_function): Don't insist on diff -r e2ab31f19799 -r 35650a3443e8 tests/test-vasprintf-posix.c --- a/tests/test-vasprintf-posix.c Sat Mar 09 11:07:30 2013 +0700 +++ b/tests/test-vasprintf-posix.c Sat Mar 09 12:30:56 2013 +0700 @@ -246,7 +246,8 @@ int retval = my_asprintf (&result, "%.0a %d", 1.51, 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);