home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / regcoll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  6.2 KB  |  263 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.  * Collation regression tests.
  16.  * (So we'll have no regrets later)
  17.  */
  18.  
  19. #ifndef _REGCOLL
  20. #define _REGCOLL
  21.  
  22. #ifndef _UTYPES
  23. #include "utypes.h"
  24. #endif
  25.  
  26. #ifndef _COLL
  27. #include "coll.h"
  28. #endif
  29.  
  30. #ifndef _COLEITR
  31. #include "coleitr.h"
  32. #endif
  33.  
  34. #ifndef _INTLTEST
  35. #include "intltest.h"
  36. #endif
  37.  
  38. #ifndef _UNISTR
  39. #include "unistr.h"
  40. #endif
  41.  
  42. class CollationRegressionTest: public IntlTest
  43. {
  44. public:
  45.  
  46.     enum EToken_Len { MAX_TOKEN_LEN = 128 };
  47.  
  48.     CollationRegressionTest();
  49.     ~CollationRegressionTest();
  50.  
  51.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par = NULL );
  52.  
  53.     // @bug 4048446
  54.     //
  55.     // CollationElementIterator.reset() doesn't work
  56.     //
  57.     void Test4048446(char *par);
  58.  
  59.     // @bug 4051866
  60.     //
  61.     // Collator -> rules -> Collator round-trip broken for expanding characters
  62.     //
  63.     void Test4051866(char *par);
  64.  
  65.     // @bug 4053636
  66.     //
  67.     // Collator thinks "black-bird" == "black"
  68.     //
  69.     void Test4053636(char *par);
  70.  
  71.  
  72.     // @bug 4054238
  73.     //
  74.     // CollationElementIterator will not work correctly if the associated
  75.     // Collator object's mode is changed
  76.     //
  77.     void Test4054238(char *par);
  78.  
  79.     // @bug 4054734
  80.     //
  81.     // Collator.IDENTICAL documented but not implemented
  82.     //
  83.     void Test4054734(char *par);
  84.  
  85.     // @bug 4054736
  86.     //
  87.     // Full Decomposition mode not implemented
  88.     //
  89.     void Test4054736(char *par);
  90.  
  91.     // @bug 4058613
  92.     //
  93.     // Collator.getInstance() causes an ArrayIndexOutofBoundsException for Korean  
  94.     //
  95.     void Test4058613(char *par);
  96.     
  97.     // @bug 4059820
  98.     //
  99.     // RuleBasedCollator.getRules does not return the exact pattern as input
  100.     // for expanding character sequences
  101.     //
  102.     void Test4059820(char *par);
  103.  
  104.     // @bug 4060154
  105.     //
  106.     // MergeCollation::fixEntry broken for "& H < \u0131, \u0130, i, I"
  107.     //
  108.     void Test4060154(char *par);
  109.  
  110.     // @bug 4062418
  111.     //
  112.     // Secondary/Tertiary comparison incorrect in French Secondary
  113.     //
  114.     void Test4062418(char *par);
  115.  
  116.     // @bug 4065540
  117.     //
  118.     // Collator.compare() method broken if either string contains spaces
  119.     //
  120.     void Test4065540(char *par);
  121.  
  122.     // @bug 4066189
  123.     //
  124.     // Unicode characters need to be recursively decomposed to get the
  125.     // correct result. For example,
  126.     // u1EB1 -> \u0103 + \u0300 -> a + \u0306 + \u0300.
  127.     //
  128.     void Test4066189(char *par);
  129.  
  130.     // @bug 4066696
  131.     //
  132.     // French secondary collation checking at the end of compare iteration fails
  133.     //
  134.     void Test4066696(char *par);
  135.  
  136.  
  137.     // @bug 4076676
  138.     //
  139.     // Bad canonicalization of same-class combining characters
  140.     //
  141.     void Test4076676(char *par);
  142.  
  143.  
  144.     // @bug 4078588
  145.     //
  146.     // RuleBasedCollator breaks on "< a < bb" rule
  147.     //
  148.     void Test4078588(char *par);
  149.  
  150.     // @bug 4079231
  151.     //
  152.     // RuleBasedCollator.equals(null) throws NullPointerException
  153.     //
  154.     void Test4079231(char *par);
  155.  
  156.     // @bug 4081866
  157.     //
  158.     // Combining characters in different classes not reordered properly.
  159.     //
  160.     void Test4081866(char *par);
  161.  
  162.     // @bug 4087241
  163.     //
  164.     // string comparison errors in Scandinavian collators
  165.     //
  166.     void Test4087241(char *par);
  167.  
  168.     // @bug 4087243
  169.     //
  170.     // CollationKey takes ignorable strings into account when it shouldn't
  171.     //
  172.     void Test4087243(char *par);
  173.  
  174.     // @bug 4092260
  175.     //
  176.     // Mu/micro conflict
  177.     // Micro symbol and greek lowercase letter Mu should sort identically
  178.     //
  179.     void Test4092260(char *par);
  180.  
  181.     // @bug 4095316
  182.     //
  183.     void Test4095316(char *par);
  184.  
  185.     // @bug 4101940
  186.     //
  187.     void Test4101940(char *par);
  188.  
  189.     // @bug 4103436
  190.     //
  191.     // Collator.compare not handling spaces properly
  192.     //
  193.     void Test4103436(char *par);
  194.  
  195.     // @bug 4114076
  196.     //
  197.     // Collation not Unicode conformant with Hangul syllables
  198.     //
  199.     void Test4114076(char *par);
  200.     
  201.     
  202.     // @bug 4114077
  203.     //
  204.     // Collation with decomposition off doesn't work for Europe 
  205.     //
  206.     void Test4114077(char *par);
  207.  
  208.     // @bug 4124632
  209.     //
  210.     // Collator.getCollationKey was hanging on certain character sequences
  211.     //
  212.     void Test4124632(char *par);
  213.     
  214.     // @bug 4132736
  215.     //
  216.     // sort order of french words with multiple accents has errors
  217.     //
  218.     void Test4132736(char *par);
  219.     
  220.     // @bug 4133509
  221.     //
  222.     // The sorting using java.text.CollationKey is not in the exact order
  223.     //
  224.     void Test4133509(char *par);
  225.  
  226.     // @bug 4139572
  227.     //
  228.     // getCollationKey throws exception for spanish text 
  229.     // Cannot reproduce this bug on 1.2, however it DOES fail on 1.1.6
  230.     //
  231.     void Test4139572(char *par);
  232.     
  233.     // @bug 4141640
  234.     //
  235.     // Support for Swedish gone in 1.1.6 (Can't create Swedish collator) 
  236.     //
  237.     void Test4141640(char *par);
  238.     
  239.     // @bug 4146160
  240.     //
  241.     // RuleBasedCollator doesn't use getCollationElementIterator internally
  242.     //
  243.     void Test4146160(char *par);
  244.  
  245. private:
  246.     //------------------------------------------------------------------------
  247.     // Internal utilities
  248.     //
  249.     void compareArray(Collator &c,
  250.                     const UChar tests[][CollationRegressionTest::MAX_TOKEN_LEN],
  251.                     int32_t testCount);
  252.  
  253.     void assertEqual(CollationElementIterator &i1, CollationElementIterator &i2);
  254.  
  255.  
  256.     RuleBasedCollator *en_us;
  257.  
  258.     static const UnicodeString test1;
  259.     static const UnicodeString test2;
  260.     static const UnicodeString test3;
  261. };
  262. #endif
  263.