-/********************************************************************
- * COPYRIGHT:
- * Copyright (c) 1997-2001, International Business Machines Corporation and
- * others. All Rights Reserved.
- ********************************************************************/
+/***********************************************************************
+ * Copyright (c) 1997-2006, International Business Machines Corporation
+ * and others. All Rights Reserved.
+ ***********************************************************************/
#include "unicode/utypes.h"
#include "unicode/datefmt.h"
#include "unicode/smpdtfmt.h"
#include "tsdate.h"
+#include "putilimp.h"
#include <float.h>
#include <stdlib.h>
+#include <math.h>
const double IntlTestDateFormat::ONEYEAR = 365.25 * ONEDAY; // Approximate
+IntlTestDateFormat::~IntlTestDateFormat() {}
+
/**
* This test does round-trip testing (format -> parse -> format -> parse -> etc.) of
* DateFormat.
int32_t dateMatch = 0;
int32_t stringMatch = 0;
UBool dump = FALSE;
+#if defined (U_CAL_DEBUG)
+ dump = TRUE;
+#endif
int32_t i;
date[0] = theDate;
}
}
}
-
+
// 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)