]> git.saurik.com Git - apple/icu.git/blame - icuSources/test/intltest/srchtest.h
ICU-64252.0.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / srchtest.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) 2001-2008, International Business Machines Corporation and others
b75a7d8f
A
6 * All Rights Reserved.
7 ***************************************************************************/
8
9#ifndef _STRSRCH_H
10#define _STRSRCH_H
11
12#include "unicode/utypes.h"
13
46f4442e 14#if !UCONFIG_NO_COLLATION
b75a7d8f
A
15
16#include "unicode/tblcoll.h"
17#include "unicode/brkiter.h"
18#include "intltest.h"
19#include "unicode/usearch.h"
20
21struct SearchData;
22typedef struct SearchData SearchData;
23
24class StringSearchTest: public IntlTest
25{
26public:
27 StringSearchTest();
28 virtual ~StringSearchTest();
29
30 void runIndexedTest(int32_t index, UBool exec, const char* &name,
31 char* par = NULL);
46f4442e 32#if !UCONFIG_NO_BREAK_ITERATION
b75a7d8f
A
33private:
34 RuleBasedCollator *m_en_us_;
35 RuleBasedCollator *m_fr_fr_;
36 RuleBasedCollator *m_de_;
37 RuleBasedCollator *m_es_;
38 BreakIterator *m_en_wordbreaker_;
39 BreakIterator *m_en_characterbreaker_;
40
41 RuleBasedCollator * getCollator(const char *collator);
42 BreakIterator * getBreakIterator(const char *breaker);
43 char * toCharString(const UnicodeString &text);
44 Collator::ECollationStrength getECollationStrength(
45 const UCollationStrength &strength) const;
46 UBool assertEqualWithStringSearch( StringSearch *strsrch,
47 const SearchData *search);
48 UBool assertEqual(const SearchData *search);
49 UBool assertCanonicalEqual(const SearchData *search);
50 UBool assertEqualWithAttribute(const SearchData *search,
51 USearchAttributeValue canonical,
52 USearchAttributeValue overlap);
53 void TestOpenClose();
54 void TestInitialization();
55 void TestBasic();
56 void TestNormExact();
57 void TestStrength();
58#if !UCONFIG_NO_BREAK_ITERATION
59 void TestBreakIterator();
60#endif
61 void TestVariable();
62 void TestOverlap();
63 void TestCollator();
64 void TestPattern();
65 void TestText();
66 void TestCompositeBoundaries();
67 void TestGetSetOffset();
68 void TestGetSetAttribute();
69 void TestGetMatch();
70 void TestSetMatch();
71 void TestReset();
72 void TestSupplementary();
73 void TestContraction();
74 void TestIgnorable();
75 void TestCanonical();
76 void TestNormCanonical();
77 void TestStrengthCanonical();
78#if !UCONFIG_NO_BREAK_ITERATION
79 void TestBreakIteratorCanonical();
80#endif
81 void TestVariableCanonical();
82 void TestOverlapCanonical();
83 void TestCollatorCanonical();
84 void TestPatternCanonical();
85 void TestTextCanonical();
86 void TestCompositeBoundariesCanonical();
87 void TestGetSetOffsetCanonical();
88 void TestSupplementaryCanonical();
89 void TestContractionCanonical();
90 void TestUClassID();
374ca955 91 void TestSubclass();
73c04bcf 92 void TestCoverage();
46f4442e
A
93 void TestDiacriticMatch();
94#endif
b75a7d8f
A
95};
96
97#endif /* #if !UCONFIG_NO_COLLATION */
98
99#endif