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