From f42a02efda42bad2937f60c5ad98b028ddc2a581 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Sun, 12 Jan 2014 04:53:29 +0100 Subject: [PATCH] tcctest: One more signed zero test This also checks that -(-0.0) is +0.0. --- tests/tcctest.c | 6 ++++++ 1 file changed, 6 insertions(+) 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)\ {\