Index: source/test/cintltst/capitst.c |
diff --git a/source/test/cintltst/capitst.c b/source/test/cintltst/capitst.c |
index 0d2fdccda3193c0d2b5d3b5cacd76d8b12a43cd7..163bb6422dd20f7a0844faa512f90f693bc70bc6 100644 |
--- a/source/test/cintltst/capitst.c |
+++ b/source/test/cintltst/capitst.c |
@@ -1446,7 +1446,7 @@ void TestGetLocale() { |
ucol_close(coll); |
} |
- /* completely non-existant locale for collator should get a default collator */ |
+ /* completely non-existent locale for collator should get a root collator */ |
{ |
UCollator *defaultColl = ucol_open(NULL, &status); |
coll = ucol_open("blahaha", &status); |
@@ -1455,15 +1455,13 @@ void TestGetLocale() { |
if(strcmp(ucol_getLocaleByType(coll, ULOC_REQUESTED_LOCALE, &status), "blahaha")) { |
log_err("Nonexisting locale didn't preserve the requested locale\n"); |
} */ |
- if(strcmp(ucol_getLocaleByType(coll, ULOC_VALID_LOCALE, &status), |
- ucol_getLocaleByType(defaultColl, ULOC_VALID_LOCALE, &status))) { |
- log_err("Valid locale for nonexisting locale locale collator differs " |
- "from valid locale for default collator\n"); |
+ const char *name = ucol_getLocaleByType(coll, ULOC_VALID_LOCALE, &status); |
+ if(*name != 0 && strcmp(name, "root") != 0) { |
+ log_err("Valid locale for nonexisting-locale collator is \"%s\" not root\n", name); |
} |
- if(strcmp(ucol_getLocaleByType(coll, ULOC_ACTUAL_LOCALE, &status), |
- ucol_getLocaleByType(defaultColl, ULOC_ACTUAL_LOCALE, &status))) { |
- log_err("Actual locale for nonexisting locale locale collator differs " |
- "from actual locale for default collator\n"); |
+ name = ucol_getLocaleByType(coll, ULOC_ACTUAL_LOCALE, &status); |
+ if(*name != 0 && strcmp(name, "root") != 0) { |
+ log_err("Actual locale for nonexisting-locale collator is \"%s\" not root\n", name); |
} |
ucol_close(coll); |
ucol_close(defaultColl); |
@@ -2424,14 +2422,13 @@ static void TestGetKeywordValuesForLocale(void) { |
UErrorCode status = U_ZERO_ERROR; |
UEnumeration *keywordValues = NULL; |
- int32_t i, n, size, valueLength; |
+ int32_t i, n, size; |
const char *locale = NULL, *value = NULL; |
UBool errorOccurred = FALSE; |
for (i = 0; i < UPRV_LENGTHOF(PREFERRED) && !errorOccurred; i++) { |
locale = PREFERRED[i][0]; |
value = NULL; |
- valueLength = 0; |
size = 0; |
keywordValues = ucol_getKeywordValuesForLocale("collation", locale, TRUE, &status); |
@@ -2440,6 +2437,7 @@ static void TestGetKeywordValuesForLocale(void) { |
break; |
} |
size = uenum_count(keywordValues, &status); |
+ (void)size; |
for (n = 0; (value = PREFERRED[i][n+1]) != NULL; n++) { |
if (!uenum_contains(keywordValues, value, &status)) { |