Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/regress/lib/libc/ieeefp/infinity Check HUGE_VALF and HUGE_VA...
details: https://anonhg.NetBSD.org/src/rev/8b4132f86fd6
branches: trunk
changeset: 554195:8b4132f86fd6
user: kleink <kleink%NetBSD.org@localhost>
date: Sat Oct 25 22:38:19 2003 +0000
description:
Check HUGE_VALF and HUGE_VALL as well. Also add some cross checking for
floating type promotion and demotion of these.
diffstat:
regress/lib/libc/ieeefp/infinity/infinity.c | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diffs (36 lines):
diff -r 7a0dd2a809ec -r 8b4132f86fd6 regress/lib/libc/ieeefp/infinity/infinity.c
--- a/regress/lib/libc/ieeefp/infinity/infinity.c Sat Oct 25 22:35:46 2003 +0000
+++ b/regress/lib/libc/ieeefp/infinity/infinity.c Sat Oct 25 22:38:19 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: infinity.c,v 1.2 2003/10/24 16:35:08 kleink Exp $ */
+/* $NetBSD: infinity.c,v 1.3 2003/10/25 22:38:19 kleink Exp $ */
/*
* This file is in the Public Domain.
@@ -7,8 +7,9 @@
*/
/*
- * Check that HUGE_VAL (alias __infinity) really is infinite.
- * Alternatively, check that isinf() and _isinfl() minimally work.
+ * Check that HUGE_VAL{,FL} (alias __infinity{,fl}) really is infinite.
+ * Alternatively, check that isinf() and _isinfl() minimally work,
+ * and that floating type promotion respectively demotion works.
*/
#include "namespace.h"
@@ -22,5 +23,14 @@
/* HUGE_VAL is meant to be an infinity. */
assert(isinf(HUGE_VAL));
assert(_isinfl(HUGE_VAL));
+
+ /* HUGE_VALF is the float analog of HUGE_VAL. */
+ assert(isinf(HUGE_VALF));
+ assert(_isinfl(HUGE_VALF));
+
+ /* HUGE_VALL is the float analog of HUGE_VAL. */
+ assert(isinf(HUGE_VALL));
+ assert(_isinfl(HUGE_VALL));
+
return 0;
}
Home |
Main Index |
Thread Index |
Old Index