ICU-865 Don't continue the test if you can't open a collator
X-SVN-Rev: 3719
This commit is contained in:
parent
4f8f138da2
commit
1c7da8f988
@ -370,6 +370,11 @@ void TestDecomposition() {
|
|||||||
el_GR = ucol_open("el_GR", &status);
|
el_GR = ucol_open("el_GR", &status);
|
||||||
vi_VN = ucol_open("vi_VN", &status);
|
vi_VN = ucol_open("vi_VN", &status);
|
||||||
|
|
||||||
|
if (U_FAILURE(status)) {
|
||||||
|
log_err("ERROR: collation creation failed.: %s\n", myErrorName(status));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* there is no reason to have canonical decomposition in en_US OR default locale */
|
/* there is no reason to have canonical decomposition in en_US OR default locale */
|
||||||
if(ucol_getNormalization(vi_VN) != UCOL_DECOMP_CAN)
|
if(ucol_getNormalization(vi_VN) != UCOL_DECOMP_CAN)
|
||||||
{
|
{
|
||||||
|
@ -107,6 +107,7 @@ void TestDecomp()
|
|||||||
myCollation = ucol_open("en_US", &status);
|
myCollation = ucol_open("en_US", &status);
|
||||||
if(U_FAILURE(status)){
|
if(U_FAILURE(status)){
|
||||||
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
resLen=0;
|
resLen=0;
|
||||||
log_verbose("Testing unorm_normalize with Decomp canonical\n");
|
log_verbose("Testing unorm_normalize with Decomp canonical\n");
|
||||||
@ -140,6 +141,7 @@ void TestCompatDecomp()
|
|||||||
myCollation = ucol_open("en_US", &status);
|
myCollation = ucol_open("en_US", &status);
|
||||||
if(U_FAILURE(status)){
|
if(U_FAILURE(status)){
|
||||||
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
resLen=0;
|
resLen=0;
|
||||||
log_verbose("Testing unorm_normalize with Decomp compat\n");
|
log_verbose("Testing unorm_normalize with Decomp compat\n");
|
||||||
@ -173,6 +175,7 @@ void TestCanonDecompCompose()
|
|||||||
myCollation = ucol_open("en_US", &status);
|
myCollation = ucol_open("en_US", &status);
|
||||||
if(U_FAILURE(status)){
|
if(U_FAILURE(status)){
|
||||||
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
resLen=0;
|
resLen=0;
|
||||||
log_verbose("Testing unorm_normalize with Decomp can compose compat\n");
|
log_verbose("Testing unorm_normalize with Decomp can compose compat\n");
|
||||||
@ -206,6 +209,7 @@ void TestCompatDecompCompose()
|
|||||||
myCollation = ucol_open("en_US", &status);
|
myCollation = ucol_open("en_US", &status);
|
||||||
if(U_FAILURE(status)){
|
if(U_FAILURE(status)){
|
||||||
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
log_err("ERROR: in creation of rule based collator: %s\n", myErrorName(status));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
resLen=0;
|
resLen=0;
|
||||||
log_verbose("Testing unorm_normalize with compat decomp compose can\n");
|
log_verbose("Testing unorm_normalize with compat decomp compose can\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user