]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/cintltst/callcoll.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / callcoll.h
CommitLineData
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
34struct OrderAndOffset
35{
36 int32_t order;
37 int32_t offset;
38};
39
40typedef struct OrderAndOffset OrderAndOffset;
b75a7d8f
A
41
42 /* tests comparison of custom collation with different strengths */
43void 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 */
45void backAndForth(UCollationElements *iter);
46/* gets an array of CEs for a string in UCollationElements iterator. */
46f4442e
A
47OrderAndOffset* getOrders(UCollationElements *iter, int32_t *orderLength);
48
49void genericOrderingTestWithResult(UCollator *coll, const char * const s[], uint32_t size, UCollationResult result);
50void genericOrderingTest(UCollator *coll, const char * const s[], uint32_t size);
51void genericLocaleStarter(const char *locale, const char * const s[], uint32_t size);
52void genericLocaleStarterWithResult(const char *locale, const char * const s[], uint32_t size, UCollationResult result);
53void genericLocaleStarterWithOptions(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize);
54void genericLocaleStarterWithOptionsAndResult(const char *locale, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
55void genericRulesStarterWithResult(const char *rules, const char * const s[], uint32_t size, UCollationResult result);
56void genericRulesStarter(const char *rules, const char * const s[], uint32_t size);
57void genericRulesStarterWithOptionsAndResult(const char *rules, const char * const s[], uint32_t size, const UColAttribute *attrs, const UColAttributeValue *values, uint32_t attsize, UCollationResult result);
374ca955 58UBool hasCollationElements(const char *locName);
b75a7d8f
A
59
60
61#endif /* #if !UCONFIG_NO_COLLATION */
62
63#endif