]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/tsdate.cpp
ICU-64252.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / tsdate.cpp
index fed509f5127d555e4cb0f133c125342224e8d0c7..596ce97024bfbaf533da05d961c1f6e9914d8765 100644 (file)
@@ -1,6 +1,7 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /***********************************************************************
- * COPYRIGHT: 
- * Copyright (c) 1997-2004, International Business Machines Corporation
+ * Copyright (c) 1997-2009, International Business Machines Corporation
  * and others. All Rights Reserved.
  ***********************************************************************/
 
 #include "unicode/smpdtfmt.h"
 #include "tsdate.h"
 #include "putilimp.h"
+#include "cstring.h"
 
 #include <float.h>
 #include <stdlib.h>
+#include <math.h>
 
 const double IntlTestDateFormat::ONEYEAR = 365.25 * ONEDAY; // Approximate
 
@@ -112,7 +115,7 @@ void IntlTestDateFormat::testFormat(/* char* par */)
 {
     if (fFormat == 0)
     {
-        errln("FAIL: DateFormat creation failed");
+        dataerrln("FAIL: DateFormat creation failed");
         return;
     }
 
@@ -214,7 +217,7 @@ void IntlTestDateFormat::tryDate(UDate theDate)
         }
     }
 }
-    
+
 // Return a random double from 0.01 to 1, inclusive
 double IntlTestDateFormat::randDouble()
 {
@@ -235,7 +238,7 @@ 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)
@@ -263,7 +266,7 @@ void IntlTestDateFormat::testAvailableLocales(/* char* par */)
         }
         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*/)