]> git.saurik.com Git - apple/icu.git/blob - icuSources/test/cintltst/citertst.h
ICU-62135.0.1.tar.gz
[apple/icu.git] / icuSources / test / cintltst / citertst.h
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-2014, International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
8 /********************************************************************************
9 *
10 * File CITERTST.H
11 *
12 * Modification History:
13 * Name Description
14 * Madhu Katragadda Converted to C
15 *********************************************************************************/
16
17 /**
18 * Collation Iterator tests.
19 * (Let me reiterate my position...)
20 */
21
22 #ifndef _CITERCOLLTST
23 #define _CITERCOLLTST
24
25 #include "unicode/utypes.h"
26
27 #if !UCONFIG_NO_COLLATION
28
29 #include "unicode/ucol.h"
30 #include "unicode/ucoleitr.h"
31 #include "cintltst.h"
32
33 #define MAX_TOKEN_LEN 16
34
35 /**
36 * Test for CollationElementIterator previous and next for the whole set of
37 * unicode characters.
38 */
39 static void TestUnicodeChar(void);
40 /**
41 * Test for CollationElementIterator previous and next for the whole set of
42 * unicode characters with normalization on.
43 */
44 static void TestNormalizedUnicodeChar(void);
45 /**
46 * Test incremental normalization
47 */
48 static void TestNormalization(void);
49 /**
50 * Test for CollationElementIterator.previous()
51 *
52 * @bug 4108758 - Make sure it works with contracting characters
53 *
54 */
55 static void TestPrevious(void);
56
57 /**
58 * Test for getOffset() and setOffset()
59 */
60 static void TestOffset(void);
61 /**
62 * Test for setText()
63 */
64 static void TestSetText(void);
65 /** @bug 4108762
66 * Test for getMaxExpansion()
67 */
68 static void TestMaxExpansion(void);
69 /**
70 * Test Bug 672, where different locales give a different offset after
71 * a previous for the same string at the same position
72 */
73 static void TestBug672(void);
74
75 /**
76 * Repeat TestBug672 with normalizatin enabled - this test revealed a bug
77 * in incremental normalization.
78 */
79 static void TestBug672Normalize(void);
80 /**
81 * Test iterators with an relatively small buffer
82 */
83 static void TestSmallBuffer(void);
84 /**
85 * Tests the discontiguos contractions
86 */
87 static void TestDiscontiguos(void);
88 /**
89 * TestSearchCollatorElements tests iterator behavior (forwards and backwards) with
90 * normalization on AND jamo tailoring, among other things.
91 */
92 static void TestSearchCollatorElements(void);
93
94 /*------------------------------------------------------------------------
95 Internal utilities
96 */
97
98
99 static void assertEqual(UCollationElements *i1, UCollationElements *i2);
100
101
102 #endif /* #if !UCONFIG_NO_COLLATION */
103
104 #endif