Author: sebor
Date: Sat Jan 7 11:59:38 2006
New Revision: 366899
URL: http://svn.apache.org/viewcvs?rev=366899&view=rev
Log:
2006-01-07 Martin Sebor <[EMAIL PROTECTED]>
* 18.limits.traps.cpp (<rw_any.h>): #included for rw_any_t.
(test_traps): Used rw_any_t in informational output and used
the "%b" specifier to format Boolean values.
Modified:
incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp
Modified: incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp
URL:
http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp?rev=366899&r1=366898&r2=366899&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp (original)
+++ incubator/stdcxx/trunk/tests/support/18.limits.traps.cpp Sat Jan 7
11:59:38 2006
@@ -21,10 +21,11 @@
#include <limits>
-#include <csetjmp> // for longjmp, setjmp
-#include <csignal> // for SIGFPE, signal
+#include <csetjmp> // for longjmp, setjmp
+#include <csignal> // for SIGFPE, signal
-#include <driver.h>
+#include <any.h> // for rw_any_t
+#include <driver.h> // for rw_test(), ...
/**************************************************************************/
@@ -57,8 +58,12 @@
template <class numT>
-numT test_traps (numT, const char *tname, int lineno, bool)
+numT test_traps (numT, int lineno, bool)
{
+ static const char* const tname = rw_any_t (numT ()).type_name ();
+
+ rw_info (0, 0, 0, "std::numeric_limits<%s>::traps", tname);
+
const bool traps = std::numeric_limits<numT>::traps;
#ifdef SIGFPE
@@ -95,11 +100,8 @@
}
rw_assert (trapped == traps, 0, lineno,
- "numeric_limits<%s>::traps == %s, got %s",
- tname,
- trapped ? "true" : "false",
- traps ? "true" : "false");
-
+ "numeric_limits<%s>::traps == %b, got %b",
+ tname, trapped, traps);
return result;
}
@@ -109,7 +111,7 @@
static int
run_test (int, char*[])
{
-#define TEST(T, floating) test_traps ((T)0, #T, __LINE__, floating)
+#define TEST(T, floating) test_traps ((T)0, __LINE__, floating)
#ifndef _RWSTD_NO_NATIVE_BOOL
TEST (bool, false);
@@ -127,8 +129,8 @@
TEST (unsigned long, false);
#ifndef _RWSTD_NO_LONG_LONG
- TEST (long long, false);
- TEST (unsigned long long, false);
+ TEST (_RWSTD_LONG_LONG, false);
+ TEST (unsigned _RWSTD_LONG_LONG, false);
#endif // _RWSTD_NO_LONG_LONG
#ifndef _RWSTD_NO_NATIVE_WCHAR_T