home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / ficoll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  2.0 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.  * CollationFinnishTest is a third level test class. This tests the locale
  16.  * specific primary and tertiary rules. For example, a-ring sorts after z
  17.  * and w and v are equivalent.
  18.  */
  19.  
  20. #ifndef _FICOLL
  21. #define _FICOLL
  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 CollationFinnishTest: public IntlTest {
  36. public:
  37.     // static constants
  38.     enum EToken_Len { MAX_TOKEN_LEN = 128 };
  39.  
  40.     CollationFinnishTest();
  41.     ~CollationFinnishTest();
  42.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par = NULL );
  43.  
  44.     // main test routine, tests rules specific to the finish locale
  45.     void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result);
  46.  
  47.     // perform tests with strength PRIMARY
  48.     void TestPrimary( char* par );
  49.  
  50.     // perform test with strength TERTIARY
  51.     void TestTertiary( char* par );
  52.  
  53. private:
  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.