/***********************************************************************
- * COPYRIGHT:
- * Copyright (c) 1997-2004, International Business Machines Corporation
+ * Copyright (c) 1997-2009, International Business Machines Corporation
* and others. All Rights Reserved.
***********************************************************************/
#include <float.h>
#include <stdlib.h>
+#include <math.h>
const double IntlTestDateFormat::ONEYEAR = 365.25 * ONEDAY; // Approximate
{
if (fFormat == 0)
{
- errln("FAIL: DateFormat creation failed");
+ dataerrln("FAIL: DateFormat creation failed");
return;
}
}
}
}
-
+
// Return a random double from 0.01 to 1, inclusive
double IntlTestDateFormat::randDouble()
{
d = -d;
if (d > 0.0)
{
- double e = uprv_floor(uprv_log10(d));
+ double e = uprv_floor(log10(d));
if (e < -2.0)
d *= uprv_pow10((int32_t)(-e-2));
else if (e > -1.0)
}
logln(all);
}
- else errln((UnicodeString)"**** FAIL: Zero available locales or null array pointer");
+ else dataerrln((UnicodeString)"**** FAIL: Zero available locales or null array pointer");
}
void IntlTestDateFormat::monsterTest(/*char *par*/)