ICU-535 fixed some compiler warnings

X-SVN-Rev: 2319
This commit is contained in:
George Rhoten 2000-08-21 22:28:56 +00:00
parent e9d77b6637
commit ad2c21909e
2 changed files with 10 additions and 1 deletions

View File

@ -49,7 +49,8 @@ randul()
}
/* Assume rand has at least 12 bits of precision */
for (i=0; i<sizeof(l); ++i) ((char*)&l)[i] = (rand() & 0x0FF0) >> 4;
for (i=0; i<sizeof(l); ++i)
((char*)&l)[i] = (char)((rand() & 0x0FF0) >> 4);
return l;
}

View File

@ -151,10 +151,18 @@ void TestGetChar()
if(c != result[i+1]){
log_err("ERROR: UTF16_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
}
UTF16_GET_CHAR_SAFE_LENIENT(input, 0, offset, sizeof(input)/U_SIZEOF_UCHAR, c);
if(c != result[i+1]){
log_err("ERROR: UTF16_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+1], c);
}
UTF16_GET_CHAR_SAFE(input, 0, offset, sizeof(input)/U_SIZEOF_UCHAR, c, TRUE);
if(c != result[i+2]){
log_err("ERROR: UTF16_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
}
UTF16_GET_CHAR_SAFE_STRICT(input, 0, offset, sizeof(input)/U_SIZEOF_UCHAR, c);
if(c != result[i+2]){
log_err("ERROR: UTF16_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
}
i=(uint16_t)(i+3);
}