Home | History | Annotate | Download | only in intltest
      1 /********************************************************************
      2  * COPYRIGHT:
      3  * Copyright (c) 2002-2003, 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 "tscoll.h"
     22 
     23 #include <stdio.h>
     24 
     25 class UCAConformanceTest: public IntlTestCollator {
     26 public:
     27   UCAConformanceTest();
     28   virtual ~UCAConformanceTest();
     29 
     30   void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
     31 
     32   void TestTableNonIgnorable(/* par */);
     33   void TestTableShifted(/* par */);
     34   void TestRulesNonIgnorable(/* par */);
     35   void TestRulesShifted(/* par */);
     36 private:
     37   void initRbUCA();
     38   void setCollNonIgnorable(UCollator *coll);
     39   void setCollShifted(UCollator *coll);
     40   void testConformance(UCollator *coll);
     41   void openTestFile(const char *type);
     42 
     43   UCollator *UCA;
     44   UCollator *rbUCA;
     45   FILE *testFile;
     46   UErrorCode status;
     47   char testDataPath[1024];
     48 };
     49 
     50 #endif /* #if !UCONFIG_NO_COLLATION */
     51 
     52 #endif
     53