home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / tztest.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  2.0 KB  |  87 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. #ifndef __TimeZoneTest__
  15. #define __TimeZoneTest__
  16.  
  17. #include "utypes.h"
  18. #include "caltztst.h"
  19. class SimpleTimeZone;
  20.  
  21. /** 
  22.  * Various tests for TimeZone
  23.  **/
  24. class TimeZoneTest: public CalendarTimeZoneTest {
  25.     // IntlTest override
  26.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par );
  27. public: // package
  28.     static const int32_t millisPerHour;
  29.  
  30. public:
  31.     /**
  32.      * Test the offset of the PRT timezone.
  33.      */
  34.     virtual void TestPRTOffset(void);
  35.     /**
  36.      * Regress a specific bug with a sequence of API calls.
  37.      */
  38.     virtual void TestVariousAPI518(void);
  39.     /**
  40.      * Test the call which retrieves the available IDs.
  41.      */
  42.     virtual void TestGetAvailableIDs913(void);
  43.  
  44.     /**
  45.      * Generic API testing for API coverage.
  46.      */
  47.     virtual void TestGenericAPI(void);
  48.     /**
  49.      * Test the setStartRule/setEndRule API calls.
  50.      */
  51.     virtual void TestRuleAPI(void);
  52.  
  53.     /**
  54.      * subtest used by TestRuleAPI
  55.      **/
  56.     void testUsingBinarySearch(SimpleTimeZone* tz, UDate min, UDate max, UDate expectedBoundary);
  57.  
  58.  
  59.     /**
  60.      *  Test short zone IDs for compliance
  61.      */ 
  62.     virtual void TestShortZoneIDs(void);
  63.  
  64.  
  65.     /**
  66.      *  Test parsing custom zones
  67.      */ 
  68.     virtual void TestCustomParse(void);
  69.     
  70.     /**
  71.      *  Test new getDisplayName() API
  72.      */ 
  73.     virtual void TestDisplayName(void);
  74.  
  75.     void TestDSTSavings(void);
  76.     void TestAlternateRules(void);
  77.  
  78.  
  79.     static const UDate INTERVAL;
  80.  
  81. private:
  82.     // internal functions
  83.     static UnicodeString& formatMinutes(int32_t min, UnicodeString& rv);
  84. };
  85.  
  86. #endif // __TimeZoneTest__
  87.