1 /********************************************************************
3 * Copyright (c) 2002-2009, International Business Machines Corporation and
4 * others. All Rights Reserved.
5 ********************************************************************/
8 * DataDrivenCollatorTest is a test class that uses data stored in resource
9 * bundles to perform testing. For more details on data structure, see
10 * source/test/testdata/DataDrivenCollationTest.txt
13 #ifndef _INTLTESTDATADRIVENCOLLATOR
14 #define _INTLTESTDATADRIVENCOLLATOR
16 #include "unicode/utypes.h"
18 #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_FILE_IO
22 #include "unicode/coll.h"
23 #include "unicode/tblcoll.h"
24 #include "unicode/sortkey.h"
25 #include "unicode/schriter.h"
33 Collator::EComparisonResult relation
;
36 class DataDrivenCollatorTest
: public IntlTestCollator
{
37 void runIndexedTest(int32_t index
, UBool exec
, const char* &name
, char* par
= NULL
);
39 DataDrivenCollatorTest();
40 virtual ~DataDrivenCollatorTest();
43 void DataDrivenTest(char *par
);
44 void processSequence(Collator
* col
, const UnicodeString
&sequence
);
45 void processTest(TestData
*testData
);
46 void processArguments(Collator
*col
, const UChar
*start
, int32_t optLen
);
47 UBool
setTestSequence(const UnicodeString
&setSequence
, SeqElement
&el
);
48 UBool
getNextInSequence(SeqElement
&el
);
50 StringCharacterIterator seq
;
51 TestDataModule
*driver
;
54 RuleBasedCollator
*UCA
; // needed for opening collators from binary images
57 #endif /* #if !UCONFIG_NO_COLLATION */