20 #if !defined (STLPORT) || defined(_STLP_USE_NAMESPACES) 30 # if defined (__BORLANDC__) 32 unsigned int _float_control_word =
_control87(0, 0);
33 _control87(PC_64|MCW_EM|IC_AFFINE, MCW_PC|MCW_EM|MCW_IC);
37 # if defined (__BORLANDC__) 40 _control87(_float_control_word, MCW_PC|MCW_EM|MCW_IC);
51 #if defined (STLPORT) && defined (_STLP_STATIC_CONST_INIT_BUG) 52 # define CHECK_COND(X) if (!(X)) { CPPUNIT_MESSAGE(#X); return false; } 57 # define CHECK_COND(X) if (!check_cond(X)) { CPPUNIT_MESSAGE(#X); return false; } 65 return (limit_is_signed && _Tp(-1) < 0) ||
66 (!limit_is_signed && _Tp(-1) > 0);
79 (!unknown_sign && ((lim::is_signed && is_signed) || (!lim::is_signed && !is_signed))));
96 if (lim::is_bounded ||
97 (!lim::is_bounded && !lim::is_signed)) {
102 if (lim::is_bounded) {
121 {
return lhs == rhs; }
136 if (lim::is_iec559) {
149 CPPUNIT_MESSAGE(
"It looks like your compiler/platform supports denormalized floating point representation.");
161 CHECK_COND(tmp >= lim::denorm_min() || tmp == (_Tp)0);
168 if (lim::has_infinity) {
169 const _Tp infinity = lim::infinity();
235 if (lim::has_quiet_NaN) {
236 const _Tp qnan = lim::quiet_NaN();
277 typedef signed char signed_char;
279 typedef unsigned char unsigned_char;
281 # if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_WCHAR_T_IS_USHORT) 285 typedef unsigned short unsigned_short;
288 typedef unsigned int unsigned_int;
291 typedef unsigned long unsigned_long;
293 # if defined (_STLP_LONG_LONG) 302 # if !defined ( _STLP_NO_LONG_DOUBLE ) 303 typedef long double long_double;
313 # if !defined ( _STLP_NO_LONG_DOUBLE ) 314 typedef long double long_double;
#define CPPUNIT_TEST_SUITE(X)
unsigned int __cdecl _control87(unsigned int, unsigned int)
bool test_unsigned_integral_limits(const _Tp &__val)
bool valid_sign_info(bool, bool)
#define CPPUNIT_TEST_SUITE_END()
_STLP_INLINE_LOOP _InputIter const _Tp & __val
bool check_cond(const bool &cond)
bool test_float_values(_Tp lhs, _Tp rhs)
bool test_qnan(const _Tp &)
#define CPPUNIT_ASSERT(X)
bool test_float_limits(const _Tp &)
bool test_signed_integral_limits(const _Tp &__val)
CPPUNIT_TEST_SUITE_REGISTRATION(LimitTest)
bool test_integral_limits_base(const _Tp &, bool unknown_sign=true, bool is_signed=true)
bool test_integral_limits(const _Tp &val, bool unknown_sign=true, bool is_signed=true)
#define CPPUNIT_MESSAGE(m)
static BOOL is_integer(parse_buffer *buf)