Module Name: src
Committed By: martin
Date: Sat Feb 1 13:53:16 UTC 2014
Modified Files:
src/tests/lib/libc/gen: t_floatunditf.c
Log Message:
Skip testcase inside its body for architectures w/o long double support
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/gen/t_floatunditf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/gen/t_floatunditf.c
diff -u src/tests/lib/libc/gen/t_floatunditf.c:1.3 src/tests/lib/libc/gen/t_floatunditf.c:1.4
--- src/tests/lib/libc/gen/t_floatunditf.c:1.3 Sat Feb 1 10:00:04 2014
+++ src/tests/lib/libc/gen/t_floatunditf.c Sat Feb 1 13:53:16 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: t_floatunditf.c,v 1.3 2014/02/01 10:00:04 martin Exp $ */
+/* $NetBSD: t_floatunditf.c,v 1.4 2014/02/01 13:53:16 martin Exp $ */
/*-
* Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -101,6 +101,7 @@ static const struct {
{ 0x3ULL, 0xcp-2L },
{ 0x1ULL, 0x8p-3L },
};
+#endif
ATF_TC(floatunditf);
ATF_TC_HEAD(floatunditf, tc)
@@ -111,6 +112,9 @@ ATF_TC_HEAD(floatunditf, tc)
ATF_TC_BODY(floatunditf, tc)
{
+#ifndef __HAVE_LONG_DOUBLE
+ atf_tc_skip("Requires long double support");
+#else
size_t i;
for (i = 0; i < __arraycount(testcases); ++i)
@@ -119,16 +123,11 @@ ATF_TC_BODY(floatunditf, tc)
"#%zu: expected %.20Lf, got %.20Lf\n", i,
testcases[i].ld,
(long double)testcases[i].u64);
-}
#endif
+}
ATF_TP_ADD_TCS(tp)
{
-#ifdef __HAVE_LONG_DOUBLE
ATF_TP_ADD_TC(tp, floatunditf);
-#else
- atf_tc_skip("No real long double");
-#endif
-
return atf_no_error();
}