]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/itformat.cpp
ICU-64243.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / itformat.cpp
index aa919d34aea1564220b1d3ac9fb1eecd004935e1..1c993fc2a87c59c3f1cd8cd1f296a7682ca94bfd 100644 (file)
@@ -1,6 +1,8 @@
+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
 /********************************************************************
  * COPYRIGHT:
- * Copyright (c) 1997-2013, International Business Machines
+ * Copyright (c) 1997-2015, International Business Machines
  * Corporation and others. All Rights Reserved.
  ********************************************************************/
 
 #include "plurfmts.h"       // PluralFormatTest
 #include "selfmts.h"       // PluralFormatTest
 #include "dtifmtts.h"       // DateIntervalFormatTest
-#include "tufmtts.h"        // TimeUnitTest
 #include "locnmtst.h"       // LocaleDisplayNamesTest
 #include "dcfmtest.h"       // DecimalFormatTest
 #include "listformattertest.h"  // ListFormatterTest
 #include "regiontst.h"      // RegionTest
+#include "numbertest.h"     // NumberTest
+#include "erarulestest.h"   // EraRulesTest
 
 extern IntlTest *createCompactDecimalFormatTest();
 extern IntlTest *createGenderInfoTest();
+#if !UCONFIG_NO_BREAK_ITERATION
+extern IntlTest *createRelativeDateTimeFormatterTest();
+#endif
+extern IntlTest *createTimeUnitTest();
+extern IntlTest *createMeasureFormatTest();
+extern IntlTest *createNumberFormatSpecificationTest();
+extern IntlTest *createScientificNumberFormatterTest();
+extern IntlTest *createFormattedValueTest();
+
 
 #define TESTCLASS(id, TestClass)          \
     case id:                              \
@@ -80,7 +92,7 @@ void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &nam
     Locale  saveDefaultLocale = Locale::getDefault();
     if (exec) {
         saveDefaultTimeZone = TimeZone::createDefault();
-        TimeZone *tz = TimeZone::createTimeZone("PST");
+        TimeZone *tz = TimeZone::createTimeZone("America/Los_Angeles");
         TimeZone::setDefault(*tz);
         delete tz;
         UErrorCode status = U_ZERO_ERROR;
@@ -131,7 +143,15 @@ void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &nam
         TESTCLASS(35,PluralRulesTest);
         TESTCLASS(36,PluralFormatTest);
         TESTCLASS(37,DateIntervalFormatTest);
-        TESTCLASS(38,TimeUnitTest);
+        case 38:
+          name = "TimeUnitTest";
+          if (exec) {
+            logln("TimeUnitTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createTimeUnitTest());
+            callTest(*test, par);
+          }
+          break;
         TESTCLASS(39,SelectFormatTest);
         TESTCLASS(40,LocaleDisplayNamesTest);
 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
@@ -157,6 +177,56 @@ void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &nam
           }
           break;
         TESTCLASS(45,RegionTest);
+        case 46:
+#if !UCONFIG_NO_BREAK_ITERATION
+          name = "RelativeDateTimeFormatterTest";
+          if (exec) {
+            logln("RelativeDateTimeFormatterTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createRelativeDateTimeFormatterTest());
+            callTest(*test, par);
+          }
+#endif
+          break;
+        case 47:
+          name = "MeasureFormatTest";
+          if (exec) {
+            logln("MeasureFormatTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createMeasureFormatTest());
+            callTest(*test, par);
+          }
+          break;
+        case 48:
+          name = "NumberFormatSpecificationTest";
+          if (exec) {
+            logln("NumberFormatSpecificationTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createNumberFormatSpecificationTest());
+            callTest(*test, par);
+          }
+          break;
+        case 49:
+          name = "ScientificNumberFormatterTest";
+          if (exec) {
+            logln("ScientificNumberFormatterTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createScientificNumberFormatterTest());
+            callTest(*test, par);
+          }
+          break;
+        TESTCLASS(50,NumberFormatDataDrivenTest);
+        TESTCLASS(51,NumberTest);
+        TESTCLASS(52,EraRulesTest);
+        case 53:
+          name = "FormattedValueTest";
+          if (exec) {
+            logln("FormattedValueTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createFormattedValueTest());
+            callTest(*test, par);
+          }
+          break;
         default: name = ""; break; //needed to end loop
     }
     if (exec) {