home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / loctest.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  3.7 KB  |  134 lines

  1. /*
  2. *****************************************************************************************
  3. *                                                                                       *
  4. * COPYRIGHT:                                                                            *
  5. *   (C) Copyright Taligent, Inc.,  1997                                                 *
  6. *   (C) Copyright International Business Machines Corporation,  1997-1998               *
  7. *   Licensed Material - Program-Property of IBM - All Rights Reserved.                  *
  8. *   US Government Users Restricted Rights - Use, duplication, or disclosure             *
  9. *   restricted by GSA ADP Schedule Contract with IBM Corp.                              *
  10. *                                                                                       *
  11. *****************************************************************************************
  12. */
  13.  
  14. #include "intltest.h"
  15. #include "locid.h"
  16.  
  17. /**
  18.  * Tests for the Locale class
  19.  **/
  20. class LocaleTest: public IntlTest {
  21. public:
  22.     LocaleTest();
  23.     ~LocaleTest();
  24.     
  25.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par = NULL );
  26.  
  27.     /**
  28.      * Test methods to set and get data fields
  29.      **/
  30.     void TestBasicGetters(void);
  31.     /**
  32.      * Use Locale to access Resource file data and compare against expected values
  33.      **/
  34.     void TestSimpleResourceInfo(void);
  35.     /**
  36.      * Use Locale to access Resource file display names and compare against expected values
  37.      **/
  38.     void TestDisplayNames(void);
  39.     /**
  40.      * Test methods for basic object behaviour
  41.      **/
  42.     void TestSimpleObjectStuff(void);
  43.     /**
  44.      * Test methods for POSIX parsing behavior
  45.      **/
  46.     void TestPOSIXParsing(void);
  47.     /**
  48.      * Test Locale::getAvailableLocales
  49.      **/
  50.     void TestGetAvailableLocales(void);
  51.     /**
  52.      * Test methods to set and access a custom data directory
  53.      **/
  54.     void TestDataDirectory(void);
  55.  
  56.     void TestISO3Fallback(void);
  57.     void TestGetLangsAndCountries(void);
  58.     void Test4126880(void);
  59.     void TestBug4135316(void);
  60.     void TestSimpleDisplayNames(void);
  61.     void TestUninstalledISO3Names(void);
  62.     void TestChangedISO639Codes(void);
  63.     void TestAtypicalLocales(void);
  64.     void TestNullDefault(void);
  65.     void TestThaiCurrencyFormat(void);
  66.     void TestEuroSupport(void);
  67.     void TestToString(void);
  68.     void Test4139940(void);
  69.     void Test4143951(void);
  70.     void Test4147315(void);
  71.     void Test4147317(void);
  72.     void Test4147552(void);
  73.     
  74.     void TestVariantParsing(void);
  75.     
  76.     void Test4105828(void) ;
  77.  
  78.     static UDate date(int32_t y, int32_t m, int32_t d, int32_t hr = 0, int32_t min = 0, int32_t sec = 0);
  79.  
  80. private:
  81.     /**
  82.      * routine to perform subtests, used by TestDisplayNames
  83.      **/
  84.     void doTestDisplayNames(Locale& inLocale, int32_t compareIndex, bool_t defaultIsFrench);
  85.     /**
  86.      * additional intialization for datatables storing expected values
  87.      **/
  88.     void setUpDataTable(void);
  89.  
  90.     static UnicodeString** dataTable;
  91.     
  92.     enum {
  93.         ENGLISH = 0,
  94.         FRENCH = 1,
  95.         CROATIAN = 2,
  96.         GREEK = 3,
  97.         NORWEGIAN = 4,
  98.         MAX_LOCALES = 4
  99.     };
  100.  
  101.     enum {
  102.         LANG = 0,
  103.         CTRY = 1,
  104.         VAR = 2,
  105.         NAME = 3,
  106.         LANG3 = 4,
  107.         CTRY3 = 5,
  108.         LCID = 6,
  109.         DLANG_EN = 7,
  110.         DCTRY_EN = 8,
  111.         DVAR_EN = 9,
  112.         DNAME_EN = 10,
  113.         DLANG_FR = 11,
  114.         DCTRY_FR = 12,
  115.         DVAR_FR = 13,
  116.         DNAME_FR = 14,
  117.         DLANG_HR = 15,
  118.         DCTRY_HR = 16,
  119.         DVAR_HR = 17,
  120.         DNAME_HR = 18,
  121.         DLANG_EL = 19,
  122.         DCTRY_EL = 20,
  123.         DVAR_EL = 21,
  124.         DNAME_EL = 22,
  125.         DLANG_RT = 23,
  126.         DCTRY_RT = 24,
  127.         DVAR_RT = 25,
  128.         DNAME_RT = 26
  129.     };
  130. };
  131.  
  132.  
  133.  
  134.