]>
git.saurik.com Git - apple/icu.git/blob - icuSources/test/intltest/rbbiapts.h
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /********************************************************************
5 * Copyright (c) 1999-2016 International Business Machines Corporation and
6 * others. All Rights Reserved.
7 ********************************************************************/
8 /************************************************************************
9 * Date Name Description
10 * 12/14/99 Madhu Creation.
11 ************************************************************************/
18 #include "unicode/utypes.h"
20 #if !UCONFIG_NO_BREAK_ITERATION
23 #include "unicode/rbbi.h"
26 * API Test the RuleBasedBreakIterator class
28 class RBBIAPITest
: public IntlTest
{
32 void runIndexedTest( int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
34 * Tests Constructor behaviour of RuleBasedBreakIterator
36 // void TestConstruction(void);
38 * Tests clone() and equals() methods of RuleBasedBreakIterator
40 void TestCloneEquals();
42 * Tests toString() method of RuleBasedBreakIterator
46 * Tests the method hashCode() of RuleBasedBreakIterator
50 * Tests the methods getText() and setText() of RuleBasedBreakIterator
52 void TestGetSetAdoptText();
54 * Testing the iteration methods of RuleBasedBreakIterator
56 void TestIteration(void);
58 void TestFilteredBreakIteratorBuilder(void);
61 * Tests creating RuleBasedBreakIterator from rules strings.
63 void TestBuilder(void);
65 void TestRoundtripRules(void);
67 void RoundtripRule(const char *dataFile
);
70 * Test getting and using binary (compiled) rules.
72 void TestGetBinaryRules(void);
75 * Tests grouping effect of 'single quotes' in rules.
77 void TestQuoteGrouping();
80 * Tests word break status returns.
82 void TestRuleStatus();
83 void TestRuleStatusVec();
87 void TestBoilerPlate();
89 void TestRegistration();
91 void TestRefreshInputText();
96 /* Internal subroutine used by TestIsBoundary() */
97 void doBoundaryTest(BreakIterator
& bi
, UnicodeString
& text
, int32_t *boundaries
);
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
);
105 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */