2002-07-10 22:23:43 +00:00
|
|
|
/********************************************************************
|
|
|
|
* COPYRIGHT:
|
2003-12-19 23:18:51 +00:00
|
|
|
* Copyright (c) 2002-2003, International Business Machines Corporation and
|
2002-07-10 22:23:43 +00:00
|
|
|
* others. All Rights Reserved.
|
|
|
|
********************************************************************/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* UCAConformanceTest performs conformance tests defined in the data
|
|
|
|
* files. ICU ships with stub data files, as the whole test are too
|
|
|
|
* long. To do the whole test, download the test files.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _UCACONF_TST
|
|
|
|
#define _UCACONF_TST
|
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#include "unicode/utypes.h"
|
|
|
|
|
|
|
|
#if !UCONFIG_NO_COLLATION
|
|
|
|
|
2002-07-10 22:23:43 +00:00
|
|
|
#include "unicode/tblcoll.h"
|
|
|
|
#include "tscoll.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
class UCAConformanceTest: public IntlTestCollator {
|
|
|
|
public:
|
|
|
|
UCAConformanceTest();
|
2002-07-16 17:23:05 +00:00
|
|
|
virtual ~UCAConformanceTest();
|
2002-07-10 22:23:43 +00:00
|
|
|
|
|
|
|
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* /*par = NULL */);
|
|
|
|
|
|
|
|
void TestTableNonIgnorable(/* par */);
|
|
|
|
void TestTableShifted(/* par */);
|
|
|
|
void TestRulesNonIgnorable(/* par */);
|
|
|
|
void TestRulesShifted(/* par */);
|
|
|
|
private:
|
|
|
|
void initRbUCA();
|
|
|
|
void setCollNonIgnorable(UCollator *coll);
|
|
|
|
void setCollShifted(UCollator *coll);
|
|
|
|
void testConformance(UCollator *coll);
|
|
|
|
void openTestFile(const char *type);
|
|
|
|
|
|
|
|
UCollator *UCA;
|
|
|
|
UCollator *rbUCA;
|
|
|
|
FILE *testFile;
|
|
|
|
UErrorCode status;
|
|
|
|
char testDataPath[1024];
|
|
|
|
};
|
|
|
|
|
2002-09-21 00:43:14 +00:00
|
|
|
#endif /* #if !UCONFIG_NO_COLLATION */
|
|
|
|
|
|
|
|
#endif
|