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