2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
2008-09-26 20:51:08 +00:00
|
|
|
* Copyright (c) 1997-2008 International Business Machines
|
2008-09-18 23:07:16 +00:00
|
|
|
* Corporation and others. All Rights Reserved.
|
2000-01-15 02:00:06 +00:00
|
|
|
********************************************************************/
|
|
|
|
/********************************************************************************
|
1999-08-16 21:50:52 +00:00
|
|
|
*
|
|
|
|
* File CAPITEST.H
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
* Name Description
|
|
|
|
* Madhu Katragadda Converted to C
|
2008-09-18 23:07:16 +00:00
|
|
|
* Brian Rower Added TestOpenVsOpenRules
|
1999-08-16 21:50:52 +00:00
|
|
|
*********************************************************************************
|
|
|
|
*//* C API TEST For COLLATOR */
|
|
|
|
|
|
|
|
#ifndef _CCOLLAPITST
|
|
|
|
#define _CCOLLAPITST
|
|
|
|
|
2002-09-20 17:54:45 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_COLLATION
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
#include "cintltst.h"
|
2005-07-06 21:27:21 +00:00
|
|
|
#include "callcoll.h"
|
2001-03-30 03:49:29 +00:00
|
|
|
#define MAX_TOKEN_LEN 16
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* error reporting utility method
|
|
|
|
**/
|
|
|
|
|
|
|
|
static void doAssert(int condition, const char *message);
|
|
|
|
/**
|
|
|
|
* Collator Class Properties
|
|
|
|
* ctor, dtor, createInstance, compare, getStrength/setStrength
|
|
|
|
* getDecomposition/setDecomposition, getDisplayName
|
|
|
|
*/
|
|
|
|
void TestProperty(void);
|
|
|
|
/**
|
|
|
|
* Test RuleBasedCollator and getRules
|
|
|
|
**/
|
|
|
|
void TestRuleBasedColl(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test compare
|
|
|
|
**/
|
|
|
|
void TestCompare(void);
|
|
|
|
/**
|
|
|
|
* Test hashCode functionality
|
|
|
|
**/
|
|
|
|
void TestHashCode(void);
|
|
|
|
/**
|
|
|
|
* Tests the constructor and numerous other methods for CollationKey
|
|
|
|
**/
|
|
|
|
void TestSortKey(void);
|
|
|
|
/**
|
|
|
|
* test the CollationElementIterator methods
|
|
|
|
**/
|
|
|
|
void TestElemIter(void);
|
|
|
|
/**
|
|
|
|
* Test ucol_getAvailable and ucol_countAvailable()
|
|
|
|
**/
|
|
|
|
void TestGetAll(void);
|
2000-08-02 19:53:47 +00:00
|
|
|
/**
|
|
|
|
* Test ucol_GetDefaultRules ()
|
|
|
|
void TestGetDefaultRules(void);
|
2001-02-26 10:56:43 +00:00
|
|
|
**/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2000-12-13 01:26:07 +00:00
|
|
|
void TestDecomposition(void);
|
2001-02-23 18:26:51 +00:00
|
|
|
/**
|
|
|
|
* Test ucol_safeClone ()
|
|
|
|
**/
|
|
|
|
void TestSafeClone(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
2005-06-30 22:45:24 +00:00
|
|
|
/**
|
|
|
|
* Test ucol_cloneBinary(), ucol_openBinary()
|
|
|
|
**/
|
|
|
|
void TestCloneBinary(void);
|
|
|
|
|
2008-09-18 23:07:16 +00:00
|
|
|
/**
|
|
|
|
* Test ucol_open() vs. ucol_openRules()
|
|
|
|
**/
|
|
|
|
void TestOpenVsOpenRules(void);
|
|
|
|
|
2002-01-21 23:54:58 +00:00
|
|
|
/**
|
|
|
|
* Test getting bounds for a sortkey
|
|
|
|
*/
|
|
|
|
void TestBounds(void);
|
|
|
|
|
2002-02-28 07:21:21 +00:00
|
|
|
/**
|
|
|
|
* Test ucol_getLocale function
|
|
|
|
*/
|
|
|
|
void TestGetLocale(void);
|
|
|
|
|
2002-08-02 06:55:51 +00:00
|
|
|
/**
|
|
|
|
* Test buffer overrun while having smaller buffer for sortkey (j1865)
|
|
|
|
*/
|
|
|
|
void TestSortKeyBufferOverrun(void);
|
|
|
|
/**
|
|
|
|
* Test getting and setting of attributes
|
|
|
|
*/
|
|
|
|
void TestGetSetAttr(void);
|
2002-09-17 06:27:51 +00:00
|
|
|
/**
|
|
|
|
* Test getTailoredSet
|
|
|
|
*/
|
|
|
|
void TestGetTailoredSet(void);
|
2002-02-28 07:21:21 +00:00
|
|
|
|
2003-05-09 20:10:44 +00:00
|
|
|
/**
|
|
|
|
* Test mergeSortKeys
|
|
|
|
*/
|
|
|
|
void TestMergeSortKeys(void);
|
|
|
|
|
2004-05-24 22:08:38 +00:00
|
|
|
/**
|
|
|
|
* test short string and collator identifier functions
|
|
|
|
*/
|
|
|
|
static void TestShortString(void);
|
|
|
|
|
2004-06-03 20:13:58 +00:00
|
|
|
/**
|
|
|
|
* test getContractions and getUnsafeSet
|
|
|
|
*/
|
|
|
|
static void TestGetContractionsAndUnsafes(void);
|
|
|
|
|
2005-07-06 21:27:21 +00:00
|
|
|
/**
|
|
|
|
* Test funny stuff with open binary
|
|
|
|
*/
|
|
|
|
static void TestOpenBinary(void);
|
2002-09-20 17:54:45 +00:00
|
|
|
#endif /* #if !UCONFIG_NO_COLLATION */
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
#endif
|