Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: source/test/cintltst/crestst.c

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/test/cintltst/cpluralrulestest.c ('k') | source/test/cintltst/creststn.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/cintltst/crestst.c
diff --git a/source/test/cintltst/crestst.c b/source/test/cintltst/crestst.c
index c71edb03e8889b4d172feecfd032eb2b329efc76..52346f55087937574a921918dd6154c6b1d2f854 100644
--- a/source/test/cintltst/crestst.c
+++ b/source/test/cintltst/crestst.c
@@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2013, International Business Machines Corporation and
+ * Copyright (c) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
@@ -28,10 +28,6 @@
#include "crestst.h"
#include "unicode/ctest.h"
-#include "ucol_imp.h" /* collation */
-
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
-
static void TestOpenDirect(void);
static void TestFallback(void);
static void TestTable32(void);
@@ -716,7 +712,7 @@ TestTable32(void) {
}
/* search for some items by key */
- for(i=0; i<LENGTHOF(testcases); ++i) {
+ for(i=0; i<UPRV_LENGTHOF(testcases); ++i) {
item=ures_getByKey(res, testcases[i].key, item, &errorCode);
if(U_FAILURE(errorCode)) {
log_err("unable to find the key \"%s\" in testdata/testtable32.res - %s\n",
@@ -998,11 +994,12 @@ static void TestGetLocaleByType(void) {
status = U_ZERO_ERROR;
continue;
}
-
+
locale = ures_getLocaleByType(res, ULOC_REQUESTED_LOCALE, &status);
- if(locale) {
+ if(U_SUCCESS(status) && locale != NULL) {
log_err("Requested locale should return NULL\n");
}
+ status = U_ZERO_ERROR;
locale = ures_getLocaleByType(res, ULOC_VALID_LOCALE, &status);
if(!locale || strcmp(locale, test[i].validLocale) != 0) {
log_err("Expected valid locale to be %s. Got %s\n", test[i].requestedLocale, locale);
@@ -1015,4 +1012,3 @@ static void TestGetLocaleByType(void) {
}
ures_close(res);
}
-
« no previous file with comments | « source/test/cintltst/cpluralrulestest.c ('k') | source/test/cintltst/creststn.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698