home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / dacoll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  2.2 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.  * CollationDanishTest 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 a-umlaut sorts before ae ligatures.  Additional test strings from the
  18.  * internet are also included.
  19.  */
  20.  
  21. #ifndef _DACOLL
  22. #define _DACOLL
  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 CollationDanishTest: public IntlTest {
  37. public:
  38.     // static constants
  39.     enum EToken_Len { MAX_TOKEN_LEN = 128 };
  40.  
  41.     CollationDanishTest();
  42.     ~CollationDanishTest();
  43.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par = NULL );
  44.  
  45.     // main test routine, Tests rules specific to danish collation
  46.     void doTest( UnicodeString source, UnicodeString target, Collator::EComparisonResult result);
  47.  
  48.     // perform tests with strength PRIMARY
  49.     void TestPrimary( char* par );
  50.  
  51.     // perform test with strength TERTIARY
  52.     void TestTertiary( char* par );
  53.  
  54. private:
  55.     static const UChar testBugs[][MAX_TOKEN_LEN];
  56.     static const UChar testNTList[][MAX_TOKEN_LEN];
  57.     static const UChar testSourceCases[][MAX_TOKEN_LEN];
  58.     static const UChar testTargetCases[][MAX_TOKEN_LEN];
  59.     static const Collator::EComparisonResult results[];
  60.  
  61.     Collator *myCollation;
  62. };
  63. #endif
  64.