]> git.saurik.com Git - apple/icu.git/blame_incremental - icuSources/test/cintltst/callcoll.h
ICU-62107.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / callcoll.h
... / ...
CommitLineData
1// © 2016 and later: Unicode, Inc. and others.
2// License & terms of use: http://www.unicode.org/copyright.html
3/********************************************************************
4 * COPYRIGHT:
5 * Copyright (c) 1997-2008, International Business Machines Corporation and
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"
26#include "unicode/ucoleitr.h"
27
28#if !UCONFIG_NO_COLLATION
29
30#include "cintltst.h"
31
32#define RULE_BUFFER_LEN 8192
33
34struct OrderAndOffset
35{
36 int32_t order;
37 int32_t offset;
38};
39
40typedef struct OrderAndOffset OrderAndOffset;
41
42 /* tests comparison of custom collation with different strengths */
43void doTest(UCollator*, const UChar* source, const UChar* target, UCollationResult result);
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. */
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);
58UBool hasCollationElements(const char *locName);
59
60
61#endif /* #if !UCONFIG_NO_COLLATION */
62
63#endif