summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-17 01:45:32 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-17 01:45:32 +0000
commitd0fdc959d933ffd2d434df182af730c9d0e1cabf (patch)
treef6f9f129c24075dc033e165f8b6ad0687f955d68 /test
parentcb3b02f51f38f3f1127d382fca721e0cec58642f (diff)
test/math/compile_test.c: "are long double functions even compile/link?" test
*: fix everything which prevents above from building
Diffstat (limited to 'test')
-rw-r--r--test/math/Makefile4
-rw-r--r--test/math/compile_test.c71
-rw-r--r--test/math/libm-test.inc4
3 files changed, 76 insertions, 3 deletions
diff --git a/test/math/Makefile b/test/math/Makefile
index 542f195b1..1c6faee29 100644
--- a/test/math/Makefile
+++ b/test/math/Makefile
@@ -1,9 +1,11 @@
# uClibc math tests
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
+include ../../.config
+
TESTS := basic-test rint tst-definitions test-fpucw test-float test-ifloat test-double test-idouble
ifeq ($(strip $(UCLIBC_HAS_LONG_DOUBLE_MATH)),y)
-TESTS += test-ldouble test-ildouble
+TESTS += test-ldouble test-ildoubl compile_test
else
CFLAGS_basic-test := -DNO_LONG_DOUBLE
endif
diff --git a/test/math/compile_test.c b/test/math/compile_test.c
new file mode 100644
index 000000000..57eb00927
--- /dev/null
+++ b/test/math/compile_test.c
@@ -0,0 +1,71 @@
+#include <math.h>
+
+void testl(long double long_double_x, int int_x, long long_x)
+{
+__finitel(long_double_x);
+__fpclassifyl(long_double_x);
+__isinfl(long_double_x);
+__isnanl(long_double_x);
+__signbitl(long_double_x);
+acoshl(long_double_x);
+acosl(long_double_x);
+asinhl(long_double_x);
+asinl(long_double_x);
+atan2l(long_double_x, long_double_x);
+atanhl(long_double_x);
+atanl(long_double_x);
+cbrtl(long_double_x);
+ceill(long_double_x);
+copysignl(long_double_x, long_double_x);
+coshl(long_double_x);
+cosl(long_double_x);
+erfcl(long_double_x);
+erfl(long_double_x);
+exp2l(long_double_x);
+expl(long_double_x);
+expm1l(long_double_x);
+fabsl(long_double_x);
+fdiml(long_double_x, long_double_x);
+floorl(long_double_x);
+fmal(long_double_x, long_double_x, long_double_x);
+fmaxl(long_double_x, long_double_x);
+fminl(long_double_x, long_double_x);
+fmodl(long_double_x, long_double_x);
+frexpl(long_double_x, &int_x);
+hypotl(long_double_x, long_double_x);
+ilogbl(long_double_x);
+ldexpl(long_double_x, int_x);
+lgammal(long_double_x);
+llrintl(long_double_x);
+llroundl(long_double_x);
+log10l(long_double_x);
+log1pl(long_double_x);
+log2l(long_double_x);
+logbl(long_double_x);
+logl(long_double_x);
+lrintl(long_double_x);
+lroundl(long_double_x);
+modfl(long_double_x, &long_double_x);
+nearbyintl(long_double_x);
+nextafterl(long_double_x, long_double_x);
+nexttowardl(long_double_x, long_double_x);
+powl(long_double_x, long_double_x);
+remainderl(long_double_x, long_double_x);
+remquol(long_double_x, long_double_x, &int_x);
+rintl(long_double_x);
+roundl(long_double_x);
+scalblnl(long_double_x, long_x);
+scalbnl(long_double_x, int_x);
+sinhl(long_double_x);
+sinl(long_double_x);
+sqrtl(long_double_x);
+tanhl(long_double_x);
+tanl(long_double_x);
+tgammal(long_double_x);
+truncl(long_double_x);
+}
+
+int main(int argc, char **argv)
+{
+ return (long) &testl;
+}
diff --git a/test/math/libm-test.inc b/test/math/libm-test.inc
index c9c2c8b41..37ebd3c28 100644
--- a/test/math/libm-test.inc
+++ b/test/math/libm-test.inc
@@ -4231,8 +4231,8 @@ round_test (void)
static void
scalb_test (void)
{
-
START (scalb);
+#ifndef TEST_LDOUBLE /* uclibc doesn't have scalbl */
TEST_ff_f (scalb, 2.0, 0.5, nan_value, INVALID_EXCEPTION);
TEST_ff_f (scalb, 3.0, -2.5, nan_value, INVALID_EXCEPTION);
@@ -4283,7 +4283,7 @@ scalb_test (void)
TEST_ff_f (scalb, 0.8L, 4, 12.8L);
TEST_ff_f (scalb, -0.854375L, 5, -27.34L);
-
+#endif
END (scalb);
}