]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/itformat.cpp
ICU-551.41.tar.gz
[apple/icu.git] / icuSources / test / intltest / itformat.cpp
index 26c53efc398fae5e6d4831be0f9a3f4b1700eb49..04043b5ede5e7f6ae78a297645ae4fd881875837 100644 (file)
@@ -1,6 +1,6 @@
 /********************************************************************
- * COPYRIGHT: 
- * Copyright (c) 1997-2008, International Business Machines
+ * COPYRIGHT:
+ * Copyright (c) 1997-2014, International Business Machines
  * Corporation and others. All Rights Reserved.
  ********************************************************************/
 
@@ -9,6 +9,7 @@
  */
 
 #include "unicode/utypes.h"
+#include "unicode/localpointer.h"
 
 #if !UCONFIG_NO_FORMATTING
 
 #include "tzfmttst.h"       // TimeZoneFormatTest
 #include "plurults.h"       // PluralRulesTest
 #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
+
+extern IntlTest *createCompactDecimalFormatTest();
+extern IntlTest *createGenderInfoTest();
+#if !UCONFIG_NO_BREAK_ITERATION
+extern IntlTest *createRelativeDateTimeFormatterTest();
+#endif
+extern IntlTest *createMeasureFormatTest();
+extern IntlTest *createNumberFormatSpecificationTest();
+extern IntlTest *createScientificNumberFormatterTest();
 
 #define TESTCLASS(id, TestClass)          \
     case id:                              \
@@ -70,7 +86,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;
@@ -111,15 +127,80 @@ void IntlTestFormat::runIndexedTest( int32_t index, UBool exec, const char* &nam
         TESTCLASS(27,AstroTest);
         TESTCLASS(28,CalendarCaseTest);
         TESTCLASS(29,TimeZoneRuleTest);
+#if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
         TESTCLASS(30,DataDrivenCalendarTest);
         TESTCLASS(31,DataDrivenFormatTest);
+#endif
         TESTCLASS(32,IntlTestDateTimePatternGeneratorAPI);
         TESTCLASS(33,TimeZoneOffsetLocalTest);
         TESTCLASS(34,TimeZoneFormatTest);
         TESTCLASS(35,PluralRulesTest);
         TESTCLASS(36,PluralFormatTest);
         TESTCLASS(37,DateIntervalFormatTest);
-
+        TESTCLASS(38,TimeUnitTest);
+        TESTCLASS(39,SelectFormatTest);
+        TESTCLASS(40,LocaleDisplayNamesTest);
+#if !UCONFIG_NO_REGULAR_EXPRESSIONS
+        TESTCLASS(41,DecimalFormatTest);
+#endif
+        TESTCLASS(42,ListFormatterTest);
+        case 43:
+          name = "GenderInfoTest";
+          if (exec) {
+            logln("GenderInfoTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createGenderInfoTest());
+            callTest(*test, par);
+          }
+          break;
+        case 44:
+          name = "CompactDecimalFormatTest";
+          if (exec) {
+            logln("CompactDecimalFormatTest test---");
+            logln((UnicodeString)"");
+            LocalPointer<IntlTest> test(createCompactDecimalFormatTest());
+            callTest(*test, par);
+          }
+          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;
         default: name = ""; break; //needed to end loop
     }
     if (exec) {