2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
|
|
|
* Copyright (c) 1997-1999, International Business Machines Corporation and
|
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
|
|
|
/********************************************************************************
|
1999-08-16 21:50:52 +00:00
|
|
|
*
|
|
|
|
* File CITERTST.H
|
|
|
|
*
|
|
|
|
* Modification History:
|
|
|
|
* Name Description
|
|
|
|
* Madhu Katragadda Converted to C
|
2000-08-14 23:35:57 +00:00
|
|
|
*********************************************************************************/
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Collation Iterator tests.
|
|
|
|
* (Let me reiterate my position...)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CITERCOLLTST
|
|
|
|
#define _CITERCOLLTST
|
|
|
|
|
|
|
|
#include "cintltst.h"
|
1999-12-28 23:57:50 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
#include "unicode/ucol.h"
|
2000-06-22 19:04:32 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
#define MAX_TOKEN_LEN 128
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test for CollationElementIterator.previous()
|
|
|
|
*
|
|
|
|
* @bug 4108758 - Make sure it works with contracting characters
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void TestPrevious(void);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Test for getOffset() and setOffset()
|
|
|
|
*/
|
|
|
|
void TestOffset(void);
|
|
|
|
/**
|
|
|
|
* Test for setText()
|
|
|
|
*/
|
|
|
|
void TestSetText(void);
|
2000-06-22 19:04:32 +00:00
|
|
|
/** @bug 4108762
|
|
|
|
* Test for getMaxExpansion()
|
|
|
|
*/
|
|
|
|
void TestMaxExpansion(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*------------------------------------------------------------------------
|
|
|
|
Internal utilities
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void backAndForth(UCollationElements* iter);
|
|
|
|
|
2000-06-22 19:04:32 +00:00
|
|
|
/**
|
|
|
|
* Verify that getMaxExpansion works on a given set of collation rules
|
|
|
|
*/
|
|
|
|
void verifyExpansion(UChar* rules, const UChar tests[], int32_t testCount);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return an integer array containing all of the collation orders
|
|
|
|
* returned by calls to next on the specified iterator
|
|
|
|
*/
|
|
|
|
static int32_t* getOrders(UCollationElements* iter, int32_t *orderLength);
|
|
|
|
|
|
|
|
|
|
|
|
static void assertEqual(UCollationElements *i1, UCollationElements *i2);
|
|
|
|
|
|
|
|
|
|
|
|
static UChar *test1;
|
|
|
|
static UChar *test2;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|