aboutsummaryrefslogtreecommitdiff
path: root/tests/tcctest.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2014-01-12 04:53:29 +0100
committerMichael Matz <matz@suse.de>2014-01-12 04:53:29 +0100
commitf42a02efda42bad2937f60c5ad98b028ddc2a581 (patch)
treeb2613f69ddc5a15beb5460ababa56007004cbf0f /tests/tcctest.c
parent05c9b76131e9d0a2e1b011eeb70ad7897efc9084 (diff)
downloadtinycc-f42a02efda42bad2937f60c5ad98b028ddc2a581.tar.gz
tinycc-f42a02efda42bad2937f60c5ad98b028ddc2a581.tar.bz2
tcctest: One more signed zero test
This also checks that -(-0.0) is +0.0.
Diffstat (limited to 'tests/tcctest.c')
-rw-r--r--tests/tcctest.c6
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)\
{\