]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/cintltst/callcoll.h
ICU-57131.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / callcoll.h
CommitLineData
b75a7d8f
A
1/********************************************************************
2 * COPYRIGHT:
46f4442e 3 * Copyright (c) 1997-2008, International Business Machines Corporation and
b75a7d8f
A
4 * others. All Rights Reserved.
5 ********************************************************************/
6/********************************************************************************
7*
8* File CALLCOLL.H
9*
10* Modification History:
11* Name Description
12* Madhu Katragadda Ported to C
13*********************************************************************************
14*/
15/**
16 * CollationDummyTest is a third level test class. This tests creation of
17 * a customized collator object. For example, number 1 to be sorted
18 * equlivalent to word 'one'.
19 */
20#ifndef _CALLCOLLTST
21#define _CALLCOLLTST
22
23#include "unicode/utypes.h"
374ca955 24#include "unicode/ucoleitr.h"
b75a7d8f
A
25
26#if !UCONFIG_NO_COLLATION
27
28#include "cintltst.h"
29
374ca955 30#define RULE_BUFFER_LEN 8192
b75a7d8f 31
46f4442e
A
32struct OrderAndOffset
33{
34 int32_t order;
35 int32_t offset;
36};
37
38typedef struct OrderAndOffset OrderAndOffset;
b75a7d8f
A
39
40 /* tests comparison of custom collation with different strengths */
41void doTest(UCollator*, const UChar* source, const UChar* target, UCollationResult result);
374ca955
A
42/* verify that iterating forward and backwards over the string yields same CEs */
43void backAndForth(UCollationElements *iter);
44/* gets an array of CEs for a string in UCollationElements iterator. */
46f4442e
A
45OrderAndOffset* getOrders(UCollationElements *iter, int32_t *orderLength);
46
47void genericOrderingTestWithResult(UCollator *coll, const char * const s[], uint32_t size, UCollationResult result);
48void genericOrderingTest(UCollator *coll, const char * const s[], uint32_t size);
49void genericLocaleStarter(const char *locale, const char * const s[], uint32_t size);
50void genericLocaleStarterWithResult(const char *locale, const char * const s[], uint32_t size, UCollationResult result);
51void genericLocaleStarterWithOptions(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize);
52void genericLocaleStarterWithOptionsAndResult(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
53void genericRulesStarterWithResult(const char *rules, const char * const s[], uint32_t size, UCollationResult result);
54void genericRulesStarter(const char *rules, const char * const s[], uint32_t size);
55void genericRulesStarterWithOptionsAndResult(const char *rules, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
374ca955 56UBool hasCollationElements(const char *locName);
b75a7d8f
A
57
58
59#endif /* #if !UCONFIG_NO_COLLATION */
60
61#endif