]>
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: | |
f3c0d7a5 | 5 | * Copyright (c) 1999-2016 International Business Machines Corporation and |
b75a7d8f A |
6 | * others. All Rights Reserved. |
7 | ********************************************************************/ | |
8 | /************************************************************************ | |
9 | * Date Name Description | |
10 | * 12/14/99 Madhu Creation. | |
11 | ************************************************************************/ | |
12 | ||
13 | ||
14 | ||
15 | #ifndef RBBIAPITEST_H | |
16 | #define RBBIAPITEST_H | |
17 | ||
18 | #include "unicode/utypes.h" | |
19 | ||
20 | #if !UCONFIG_NO_BREAK_ITERATION | |
21 | ||
22 | #include "intltest.h" | |
23 | #include "unicode/rbbi.h" | |
24 | ||
25 | /** | |
26 | * API Test the RuleBasedBreakIterator class | |
27 | */ | |
28 | class RBBIAPITest: public IntlTest { | |
29 | public: | |
30 | ||
31 | ||
32 | void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ); | |
33 | /** | |
34 | * Tests Constructor behaviour of RuleBasedBreakIterator | |
35 | **/ | |
36 | // void TestConstruction(void); | |
37 | /** | |
38 | * Tests clone() and equals() methods of RuleBasedBreakIterator | |
39 | **/ | |
40 | void TestCloneEquals(); | |
41 | /** | |
42 | * Tests toString() method of RuleBasedBreakIterator | |
43 | **/ | |
44 | void TestgetRules(); | |
45 | /** | |
46 | * Tests the method hashCode() of RuleBasedBreakIterator | |
47 | **/ | |
48 | void TestHashCode(); | |
49 | /** | |
50 | * Tests the methods getText() and setText() of RuleBasedBreakIterator | |
51 | **/ | |
52 | void TestGetSetAdoptText(); | |
53 | /** | |
54 | * Testing the iteration methods of RuleBasedBreakIterator | |
55 | **/ | |
56 | void TestIteration(void); | |
57 | ||
57a6839d | 58 | void TestFilteredBreakIteratorBuilder(void); |
b75a7d8f A |
59 | |
60 | /** | |
61 | * Tests creating RuleBasedBreakIterator from rules strings. | |
62 | **/ | |
63 | void TestBuilder(void); | |
64 | ||
65 | void TestRoundtripRules(void); | |
66 | ||
67 | void RoundtripRule(const char *dataFile); | |
68 | ||
46f4442e | 69 | /** |
f3c0d7a5 | 70 | * Test getting and using binary (compiled) rules. |
46f4442e | 71 | **/ |
f3c0d7a5 | 72 | void TestGetBinaryRules(void); |
46f4442e | 73 | |
b75a7d8f A |
74 | /** |
75 | * Tests grouping effect of 'single quotes' in rules. | |
76 | **/ | |
77 | void TestQuoteGrouping(); | |
78 | ||
79 | /** | |
80 | * Tests word break status returns. | |
81 | */ | |
374ca955 A |
82 | void TestRuleStatus(); |
83 | void TestRuleStatusVec(); | |
b75a7d8f A |
84 | |
85 | void TestBug2190(); | |
86 | ||
87 | void TestBoilerPlate(); | |
88 | ||
89 | void TestRegistration(); | |
90 | ||
4388f060 A |
91 | void TestRefreshInputText(); |
92 | ||
b75a7d8f A |
93 | /** |
94 | *Internal subroutines | |
95 | **/ | |
96 | /* Internal subroutine used by TestIsBoundary() */ | |
57a6839d | 97 | void doBoundaryTest(BreakIterator& bi, UnicodeString& text, int32_t *boundaries); |
b75a7d8f A |
98 | |
99 | /*Internal subroutine used for comparision of expected and acquired results */ | |
100 | void doTest(UnicodeString& testString, int32_t start, int32_t gotoffset, int32_t expectedOffset, const char* expected); | |
101 | ||
102 | ||
103 | }; | |
104 | ||
105 | #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ | |
106 | ||
107 | #endif |