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