home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / decoll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  2.1 KB  |  64 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. /**
  15.  * CollationGermanTest is a third level test class.  This tests the locale
  16.  * specific primary, secondary and tertiary rules.  For example, o-umlaut
  17.  * is sorted with expanding char e.
  18.  */
  19. #ifndef _DECOLL
  20. #define _DECOLL
  21.  
  22. #ifndef _UTYPES
  23. #include "utypes.h"
  24. #endif
  25.  
  26. #ifndef _COLL
  27. #include "coll.h"
  28. #endif
  29.  
  30. #ifndef _INTLTEST
  31. #include "intltest.h"
  32. #endif
  33.  
  34. class CollationGermanTest: public IntlTest {
  35. public:
  36.     // static constants
  37.     enum EToken_Len { MAX_TOKEN_LEN = 128 };
  38.  
  39.     CollationGermanTest();
  40.     ~CollationGermanTest();
  41.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par = NULL );
  42.  
  43.     //main test routine, tests rules specific to germa locale
  44.     void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result);
  45.  
  46.     // perform test with strength PRIMARY
  47.     void TestPrimary( char* par );
  48.  
  49.     // perform test with strength SECONDARY
  50.     void TestSecondary( char* par );
  51.  
  52.     // perform tests with strength TERTIARY
  53.     void TestTertiary( char* par );
  54.  
  55. private:
  56.     static const UChar testSourceCases[][MAX_TOKEN_LEN];
  57.     static const UChar testTargetCases[][MAX_TOKEN_LEN];
  58.     static const Collator::EComparisonResult results[][2];
  59.  
  60.     Collator *myCollation;
  61. };
  62.  
  63. #endif
  64.