scuffed-code/icu4c/source/test/intltest/apicoll.h

149 lines
3.6 KiB
C
Raw Normal View History

/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
1999-08-16 21:50:52 +00:00
/**
* CollationAPITest is a third level test class. This test performs API
* related tests for the Collation framework.
*/
#ifndef _APICOLL
#define _APICOLL
#include "unicode/tblcoll.h"
#include "tscoll.h"
1999-08-16 21:50:52 +00:00
class CollationAPITest: public IntlTestCollator {
1999-08-16 21:50:52 +00:00
public:
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
void doAssert(UBool condition, const char *message);
1999-08-16 21:50:52 +00:00
/**
* This tests the properties of a collator object.
* - constructor/destructor
* - factory method createInstance
* - compare and getCollationKey
* - get/set decomposition mode and comparison level
* - displayable name in the desired locale
*/
void TestProperty(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the RuleBasedCollator
* - constructor/destructor
* - getRules
*/
void TestRuleBasedColl(/* char* par */);
/**
* This tests the RuleBasedCollator
* - getRules
*/
void TestRules(/* char* par */);
/**
* Tests decomposition setting
*/
void TestDecomposition();
/**
* SafeClone test
*/
void TestSafeClone();
1999-08-16 21:50:52 +00:00
/**
* This tests the properties of a rule based collator object.
* - constructor/destructor
* - == and != operators
* - clone and copy
* - collation rules access
*/
void TestOperators(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the duplication of a collator object.
*/
void TestDuplicate(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the comparison convenience methods of a collator object.
* - greater than
* - greater than or equal to
* - equal to
*/
void TestCompare(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the hashCode method of a collator object.
*/
void TestHashCode(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the collation key related APIs.
* - constructor/destructor
* - Collator::getCollationKey
* - == and != operators
* - comparison between collation keys
* - creating collation key with a byte array and vice versa
*/
void TestCollationKey(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the CollationElementIterator related APIs.
* - creation of a CollationElementIterator object
* - == and != operators
* - iterating forward
* - reseting the iterator index
* - requesting the order properties(primary, secondary or tertiary)
*/
void TestElemIter(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the list the all available locales.
*/
void TestGetAll(/* char* par */);
1999-08-16 21:50:52 +00:00
/**
* This tests the sort keys generated by collator
*/
void TestSortKey();
/**
* This tests getMaxExpansion
*/
void TestMaxExpansion();
/**
* Tests the retrieval of names given a locale
*/
void TestDisplayName();
/**
* Tests the collator attributes
*/
void TestAttribute();
/**
* Tests the setters and getters of variable top
*/
void TestVariableTopSetting();
/**
* Tests GetLocale for a Collator
*/
void TestGetLocale();
/**
* test canonical iterator
*/
void TestCanonicalIterator();
1999-08-16 21:50:52 +00:00
private:
// If this is too small for the test data, just increase it.
// Just don't make it too large, otherwise the executable will get too big
enum EToken_Len { MAX_TOKEN_LEN = 16 };
1999-08-16 21:50:52 +00:00
};
#endif