]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /******************************************************************** |
2 | * COPYRIGHT: | |
3 | * Copyright (c) 2002, International Business Machines Corporation and | |
4 | * others. All Rights Reserved. | |
5 | ********************************************************************/ | |
6 | ||
7 | /** | |
8 | * UCAConformanceTest performs conformance tests defined in the data | |
9 | * files. ICU ships with stub data files, as the whole test are too | |
10 | * long. To do the whole test, download the test files. | |
11 | */ | |
12 | ||
13 | #ifndef _UCACONF_TST | |
14 | #define _UCACONF_TST | |
15 | ||
16 | #include "unicode/utypes.h" | |
17 | ||
18 | #if !UCONFIG_NO_COLLATION | |
19 | ||
20 | #include "unicode/tblcoll.h" | |
21 | #include "unicode/ustring.h" | |
22 | #include "tscoll.h" | |
23 | #include "uparse.h" | |
24 | #include "cstring.h" | |
25 | ||
26 | #include <stdio.h> | |
27 | ||
28 | class UCAConformanceTest: public IntlTestCollator { | |
29 | public: | |
30 | UCAConformanceTest(); | |
31 | virtual ~UCAConformanceTest(); | |
32 | ||
33 | void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */); | |
34 | ||
35 | void TestTableNonIgnorable(/* par */); | |
36 | void TestTableShifted(/* par */); | |
37 | void TestRulesNonIgnorable(/* par */); | |
38 | void TestRulesShifted(/* par */); | |
39 | private: | |
40 | void initRbUCA(); | |
41 | void setCollNonIgnorable(UCollator *coll); | |
42 | void setCollShifted(UCollator *coll); | |
43 | void testConformance(UCollator *coll); | |
44 | void openTestFile(const char *type); | |
45 | ||
46 | UCollator *UCA; | |
47 | UCollator *rbUCA; | |
48 | FILE *testFile; | |
49 | UErrorCode status; | |
50 | char testDataPath[1024]; | |
51 | }; | |
52 | ||
53 | #endif /* #if !UCONFIG_NO_COLLATION */ | |
54 | ||
55 | #endif |