2000-01-15 02:00:06 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2001-03-21 19:46:49 +00:00
|
|
|
* Copyright (c) 1997-2001, International Business Machines Corporation and
|
2000-01-15 02:00:06 +00:00
|
|
|
* 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
|
|
|
|
2001-03-30 03:49:29 +00:00
|
|
|
#define MAX_TOKEN_LEN 16
|
|
|
|
|
2001-02-23 23:41:16 +00:00
|
|
|
/**
|
|
|
|
* Test for CollationElementIterator previous and next for the whole set of
|
|
|
|
* unicode characters.
|
|
|
|
*/
|
|
|
|
static void TestUnicodeChar(void);
|
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
/**
|
|
|
|
* Test for CollationElementIterator.previous()
|
|
|
|
*
|
|
|
|
* @bug 4108758 - Make sure it works with contracting characters
|
|
|
|
*
|
|
|
|
*/
|
2000-11-21 04:05:39 +00:00
|
|
|
static void TestPrevious(void);
|
2001-03-30 03:49:29 +00:00
|
|
|
|
1999-08-16 21:50:52 +00:00
|
|
|
/**
|
|
|
|
* Test for getOffset() and setOffset()
|
|
|
|
*/
|
2000-11-21 04:05:39 +00:00
|
|
|
static void TestOffset(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
/**
|
|
|
|
* Test for setText()
|
|
|
|
*/
|
2000-11-21 04:05:39 +00:00
|
|
|
static void TestSetText(void);
|
2000-06-22 19:04:32 +00:00
|
|
|
/** @bug 4108762
|
|
|
|
* Test for getMaxExpansion()
|
|
|
|
*/
|
2000-11-21 04:05:39 +00:00
|
|
|
static void TestMaxExpansion(void);
|
2001-04-07 00:20:32 +00:00
|
|
|
/**
|
|
|
|
* Test Bug 672, where different locales give a different offset after
|
|
|
|
* a previous for the same string at the same position
|
|
|
|
*/
|
|
|
|
static void TestBug672(void);
|
1999-08-16 21:50:52 +00:00
|
|
|
|
|
|
|
/*------------------------------------------------------------------------
|
|
|
|
Internal utilities
|
|
|
|
*/
|
|
|
|
|
|
|
|
static void backAndForth(UCollationElements* iter);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|