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