ICU-1992 .dat -> .icu

X-SVN-Rev: 9234
This commit is contained in:
Steven R. Loomis 2002-07-17 19:26:07 +00:00
parent 1386f08c7f
commit aa10fcc6e5
3 changed files with 16 additions and 18 deletions

View file

@ -63,7 +63,7 @@
// Information used to identify and validate the data
#define TZ_DATA_NAME "tz"
#define TZ_DATA_TYPE "dat"
#define TZ_DATA_TYPE "icu"
// Fields in UDataInfo:

View file

@ -402,9 +402,9 @@ ucol_cloneRuleData(const UCollator *coll, int32_t *length, UErrorCode *status);
#define getExpansionSuffix(coleiter) ((coleiter)->iteratordata_.CEpos - (coleiter)->iteratordata_.toReturn)
#define setExpansionSuffix(coleiter, offset) ((coleiter)->iteratordata_.toReturn = (coleiter)->iteratordata_.CEpos - leftoverces)
#define UCA_DATA_TYPE "dat"
#define UCA_DATA_TYPE "icu"
#define UCA_DATA_NAME "ucadata"
#define INVC_DATA_TYPE "dat"
#define INVC_DATA_TYPE "icu"
#define INVC_DATA_NAME "invuca"
/* This is an enum that lists magic special byte values from the fractional UCA */

View file

@ -79,13 +79,13 @@ static void TestUDataOpen(){
UDataMemory *result;
UErrorCode status=U_ZERO_ERROR;
const char* memMap[][2]={
{"tz", "dat"},
{"tz", "icu"},
{"cnvalias", "icu"},
{"unames", "dat"},
{"unames", "icu"},
{"ibm-1141", "cnv"}
};
const char* name = "test";
const char* type = "dat";
const char* type = "icu";
const char dirSepString[] = {U_FILE_SEP_CHAR, 0};
char* path=(char*)malloc(sizeof(char) * (strlen(ctest_dataOutDir())
@ -160,7 +160,7 @@ static void TestUDataOpen(){
strcat(icuDataFilePath, dirSepString);
strcat(icuDataFilePath, U_ICUDATA_NAME);
strcat(icuDataFilePath, "_");
strcat(icuDataFilePath, "tz.dat");
strcat(icuDataFilePath, "tz.icu");
/* lots_of_mallocs(); */
if (stat(icuDataFilePath, &stat_buf) == 0)
@ -267,8 +267,6 @@ static void TestUDataSetAppData(){
size_t i;
/** srl REVISIT **/
/* Open the testdata.dat file, using normal */
const char* tdrelativepath = loadTestData(&status);
char* filePath=(char*)malloc(sizeof(char) * (strlen(tdrelativepath) + strlen(".dat") +1 +strlen(tdrelativepath)) );
@ -447,7 +445,7 @@ static void TestUDataOpenChoiceDemo1() {
"unames",
"test"
};
const char* type="dat";
const char* type="icu";
const char* testPath="testdata";
result=udata_openChoice(NULL, "icu", name[0], isAcceptable1, NULL, &status);
@ -518,7 +516,7 @@ static void TestUDataOpenChoiceDemo2() {
int p=2;
const char* name="test";
const char* type="dat";
const char* type="icu";
const char* path = loadTestData(&status);
result=udata_openChoice(path, type, name, isAcceptable, &p, &status);
@ -575,11 +573,11 @@ static void TestUDataGetInfo() {
UErrorCode status=U_ZERO_ERROR;
const char* name="cnvalias";
const char* name2="test";
const char* type="dat";
const char* type="icu";
const char* testPath=loadTestData(&status);
log_verbose("Testing udata_getInfo() for cnvalias.dat\n");
log_verbose("Testing udata_getInfo() for cnvalias.icu\n");
result=udata_open(NULL, "icu", name, &status);
if(U_FAILURE(status)){
log_err("FAIL: udata_open() failed for path = NULL, name=%s, type=%s, \n errorcode=%s\n", name, type, myErrorName(status));
@ -603,7 +601,7 @@ static void TestUDataGetInfo() {
udata_close(result);
log_verbose("Testing udata_getInfo() for test.dat\n");
log_verbose("Testing udata_getInfo() for test.icu\n");
result=udata_open(testPath, type, name2, &status);
if(U_FAILURE(status)) {
log_err("FAIL: udata_open() failed for path=%s name2=%s, type=%s, \n errorcode=%s\n", testPath, name2, type, myErrorName(status));
@ -642,7 +640,7 @@ static void TestUDataGetMemory() {
const char* testPath = loadTestData(&status);
type="icu";
log_verbose("Testing udata_getMemory for \"cnvalias.dat()\"\n");
log_verbose("Testing udata_getMemory() for \"cnvalias.icu\"\n");
result=udata_openChoice(NULL, type, name, isAcceptable1, NULL, &status);
if(U_FAILURE(status)){
log_err("FAIL: udata_openChoice() failed for name=%s, type=%s, \n errorcode=%s\n", name, type, myErrorName(status));
@ -656,8 +654,8 @@ static void TestUDataGetMemory() {
udata_close(result);
type="dat";
log_verbose("Testing udata_getMemory for \"test.dat\"()\n");
type="icu";
log_verbose("Testing udata_getMemory for \"test.icu\"()\n");
result=udata_openChoice(testPath, type, name2, isAcceptable3, NULL, &status);
if(U_FAILURE(status)){
log_err("FAIL: udata_openChoice() failed for path=%s name=%s, type=%s, \n errorcode=%s\n", testPath, name2, type, myErrorName(status));
@ -692,7 +690,7 @@ static void TestErrorConditions(){
};
const char* name = "test";
const char* type="dat";
const char* type="icu";
const char *testPath = loadTestData(&status);