ICU-6076 Prevent crashes while testing memory failures.

X-SVN-Rev: 23445
This commit is contained in:
George Rhoten 2008-02-16 12:30:55 +00:00
parent 0421a0ee5f
commit 512e3f34da
2 changed files with 6 additions and 9 deletions

View File

@ -812,7 +812,6 @@ static void TestExtra()
static void TestJB581(void)
{
UChar dispName [100];
int32_t bufferLen = 0;
UChar source [100];
UChar target [100];
@ -831,9 +830,7 @@ static void TestJB581(void)
myCollator = ucol_open("en_US", &status);
if (U_FAILURE(status)){
bufferLen = uloc_getDisplayName("en_US", 0, dispName, 100, &status);
/*Report the error with display name... */
log_err("ERROR: Failed to create the collator for : \"%s\"\n", dispName);
log_err("ERROR: Failed to create the collator : %s\n", u_errorName(status));
return;
}
result = ucol_strcoll(myCollator, source, -1, target, -1);
@ -876,11 +873,7 @@ static void TestJB1401(void)
myCollator = ucol_open("en_US", &status);
if (U_FAILURE(status)){
int32_t bufferLen = 0;
UChar dispName [100];
bufferLen = uloc_getDisplayName("en_US", 0, dispName, 100, &status);
/*Report the error with display name... */
log_err("ERROR: Failed to create the collator for : \"%s\"\n", dispName);
log_err("ERROR: Failed to create the collator : %s\n", u_errorName(status));
return;
}
ucol_setAttribute(myCollator, UCOL_NORMALIZATION_MODE, UCOL_ON, &status);

View File

@ -4847,6 +4847,10 @@ TestVI5913(void)
/* Test Vietnamese sort. */
coll = ucol_open("vi", &status);
if(U_FAILURE(status)) {
log_err("Couldn't open collator %d\n", &status);
return;
}
log_verbose("\n\nVI collation:");
if ( !ucol_equal(coll, tData[0], u_strlen(tData[0]), tData[2], u_strlen(tData[2])) ) {
log_err("\\u1EAC not equals to \\u1EA0+\\u0302\n");