Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/gen Skip testcase inside its body for archite...



details:   https://anonhg.NetBSD.org/src/rev/2e570c226a94
branches:  trunk
changeset: 793269:2e570c226a94
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Feb 01 13:53:16 2014 +0000

description:
Skip testcase inside its body for architectures w/o long double support

diffstat:

 tests/lib/libc/gen/t_floatunditf.c |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r 0431f61f8675 -r 2e570c226a94 tests/lib/libc/gen/t_floatunditf.c
--- a/tests/lib/libc/gen/t_floatunditf.c        Sat Feb 01 13:29:45 2014 +0000
+++ b/tests/lib/libc/gen/t_floatunditf.c        Sat Feb 01 13:53:16 2014 +0000
@@ -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 @@
        { 0x3ULL, 0xcp-2L },
        { 0x1ULL, 0x8p-3L },
 };
+#endif
 
 ATF_TC(floatunditf);
 ATF_TC_HEAD(floatunditf, tc)
@@ -111,6 +112,9 @@
 
 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 @@
                    "#%zu: expected %.20Lf, got %.20Lf\n", i,
                    testcases[i].ld,
                    (long double)testcases[i].u64);
+#endif
 }
-#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();
 }



Home | Main Index | Thread Index | Old Index