diff options
author | Gary V. Vaughan <gary@gnu.org> | 2013-03-09 11:07:30 +0700 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2013-03-09 11:07:30 +0700 |
commit | 0fe13d91e3815a6b84686114d89fbc93a82d4997 (patch) | |
tree | a31d89a1ff6884eef91509d0ee833a69fc9214c4 /tests | |
parent | cc2981ec569dcbe10e4741d997c640676bbe2744 (diff) | |
download | gnulib-0fe13d91e3815a6b84686114d89fbc93a82d4997.tar.gz |
vasprintf-posix-tests: allow rounding 1.5 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.5 to 1 here.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-vasprintf-posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-vasprintf-posix.c b/tests/test-vasprintf-posix.c index 503d32692e..fc38bc3dbb 100644 --- a/tests/test-vasprintf-posix.c +++ b/tests/test-vasprintf-posix.c @@ -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); |