From e9da355304ef07d03128a3c1492fa3f8c1273de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 29 Jul 2019 21:39:32 +0300 Subject: [PATCH] crt-test: Test the copysign function on any platform, not only on windows --- test/crt-test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/crt-test.c b/test/crt-test.c index 7e9d75a..a2a1866 100644 --- a/test/crt-test.c +++ b/test/crt-test.c @@ -840,7 +840,6 @@ int main(int argc, char* argv[]) { TEST_ATANH(atanhf); TEST_ATANH(atanhl); -#ifdef _WIN32 #define TEST_COPYSIGN(copysign) \ TEST_FLT_ACCURACY(copysign(F(3.125), F(1)), 3.125, 0.0001); \ TEST_FLT_ACCURACY(copysign(F(3.125), F(-1)), -3.125, 0.0001); \ @@ -854,13 +853,15 @@ int main(int argc, char* argv[]) { TEST_FLT_NAN(copysign(F(NAN), F(-1)), -F(NAN)); \ TEST_FLT_NAN(copysign(-F(NAN), F(NAN)), F(NAN)) - TEST_COPYSIGN(_copysign); - TEST_COPYSIGN(_copysignf); - TEST_COPYSIGN(_copysignl); TEST_COPYSIGN(copysign); TEST_COPYSIGN(copysignf); TEST_COPYSIGN(copysignl); +#ifdef _WIN32 + TEST_COPYSIGN(_copysign); + TEST_COPYSIGN(_copysignf); + TEST_COPYSIGN(_copysignl); + TEST_FLT_ACCURACY(_chgsignl(F(3.125)), -3.125, 0.0001); TEST_FLT_ACCURACY(_chgsignl(F(-3.125)), 3.125, 0.0001); TEST_FLT(_chgsignl(F(INFINITY)), -INFINITY);