home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / ICU / src / icu / source / test / intltest / apicoll.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-16  |  3.2 KB  |  111 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.  * CollationAPITest is a third level test class. This test performs API 
  16.  * related tests for the Collation framework.
  17.  */
  18.  
  19. #ifndef _APICOLL
  20. #define _APICOLL
  21.  
  22. #ifndef _UTYPES
  23. #include "utypes.h"
  24. #endif
  25.  
  26. #ifndef _COLL
  27. #include "coll.h"
  28. #endif
  29.  
  30. #ifndef _TBLCOLL
  31. #include "tblcoll.h"
  32. #endif
  33.  
  34. #ifndef _INTLTEST
  35. #include "intltest.h"
  36. #endif
  37.  
  38. class CollationAPITest: public IntlTest {
  39. public:
  40.     void runIndexedTest( int32_t index, bool_t exec, char* &name, char* par = NULL );
  41.     void doAssert(bool_t condition, const char *message);
  42.  
  43.     /**
  44.      * This tests the properties of a collator object.
  45.      * - constructor/destructor
  46.      * - factory method createInstance
  47.      * - compare and getCollationKey
  48.      * - get/set decomposition mode and comparison level
  49.      * - displayable name in the desired locale
  50.      */
  51.     void TestProperty( char* par );
  52.  
  53.     /**
  54.      * This tests the properties of a rule based collator object.
  55.      * - constructor/destructor
  56.      * - == and != operators
  57.      * - clone and copy
  58.      * - collation rules access
  59.      */
  60.     void TestOperators( char* par );
  61.  
  62.     /**
  63.      * This tests the duplication of a collator object.
  64.      */
  65.     void TestDuplicate( char* par );
  66.  
  67.     /**
  68.      * This tests the comparison convenience methods of a collator object.
  69.      * - greater than
  70.      * - greater than or equal to
  71.      * - equal to
  72.      */
  73.     void TestCompare( char* par );
  74.  
  75.     /**
  76.      * This tests the hashCode method of a collator object.
  77.      */
  78.     void TestHashCode( char* par );
  79.  
  80.     /**
  81.      * This tests the collation key related APIs.
  82.      * - constructor/destructor
  83.      * - Collator::getCollationKey
  84.      * - == and != operators
  85.      * - comparison between collation keys
  86.      * - creating collation key with a byte array and vice versa
  87.      */
  88.     void TestCollationKey( char* par );
  89.  
  90.     /**
  91.      * This tests the CollationElementIterator related APIs.
  92.      * - creation of a CollationElementIterator object
  93.      * - == and != operators
  94.      * - iterating forward
  95.      * - reseting the iterator index
  96.      * - requesting the order properties(primary, secondary or tertiary)
  97.      */
  98.     void TestElemIter( char* par );
  99.  
  100.     /**
  101.      * This tests the list the all available locales.
  102.      */
  103.     void TestGetAll( char* par );
  104.  
  105. private:
  106.     // static constants
  107.     enum EToken_Len { MAX_TOKEN_LEN = 128 };
  108.  
  109. };
  110. #endif
  111.