diff options
| author | Michael Matz <matz@suse.de> | 2014-01-12 04:53:29 +0100 |
|---|---|---|
| committer | Michael Matz <matz@suse.de> | 2014-01-12 04:53:29 +0100 |
| commit | f42a02efda42bad2937f60c5ad98b028ddc2a581 (patch) | |
| tree | b2613f69ddc5a15beb5460ababa56007004cbf0f | |
| parent | 05c9b76131e9d0a2e1b011eeb70ad7897efc9084 (diff) | |
| download | tinycc-f42a02efda42bad2937f60c5ad98b028ddc2a581.tar.gz tinycc-f42a02efda42bad2937f60c5ad98b028ddc2a581.tar.bz2 | |
tcctest: One more signed zero test
This also checks that -(-0.0) is +0.0.
| -rw-r--r-- | tests/tcctest.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/tcctest.c b/tests/tcctest.c index d96c5a1..e84f291 100644 --- a/tests/tcctest.c +++ b/tests/tcctest.c @@ -1721,6 +1721,12 @@ void prefix ## signed_zeros(void) \ 1.0 / x != 1.0 / p);\ else\ printf ("x != +y; this is wrong!\n");\ + p = -y;\ + if (x == p)\ + printf ("Test 1.0 / x != 1.0 / -y returns %d (should be 0).\n",\ + 1.0 / x != 1.0 / p);\ + else\ + printf ("x != -y; this is wrong!\n");\ }\ void prefix ## test(void)\ {\ |
