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/nucnvtst.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/nfsprep.c ('k') | source/test/cintltst/reapits.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/cintltst/nucnvtst.c
diff --git a/source/test/cintltst/nucnvtst.c b/source/test/cintltst/nucnvtst.c
index f4a443cd9627b3d6c022da5ddb98fcf6c27ae6e1..5398cdeda68de0eb16987ad3484c4850b8b0b474 100644
--- a/source/test/cintltst/nucnvtst.c
+++ b/source/test/cintltst/nucnvtst.c
@@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2012, International Business Machines Corporation and
+ * Copyright (c) 1997-2014, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/*******************************************************************************
@@ -26,8 +26,6 @@
#include "cmemory.h"
#include "nucnvtst.h"
-#define LENGTHOF(array) (sizeof(array)/sizeof((array)[0]))
-
static void TestNextUChar(UConverter* cnv, const char* source, const char* limit, const int32_t results[], const char* message);
static void TestNextUCharError(UConverter* cnv, const char* source, const char* limit, UErrorCode expected, const char* message);
#if !UCONFIG_NO_COLLATION
@@ -5397,6 +5395,12 @@ static void TestJitterbug981(){
}
rules = ucol_getRules(myCollator, &rules_length);
+ if(rules_length == 0) {
+ log_data_err("missing zh tailoring rule string\n");
+ ucol_close(myCollator);
+ ucnv_close(utf8cnv);
+ return;
+ }
buff_size = rules_length * ucnv_getMaxCharSize(utf8cnv);
buff = malloc(buff_size);
@@ -5569,7 +5573,7 @@ TestIsFixedWidth() {
"UTF16"
};
- for (i = 0; i < LENGTHOF(fixedWidth); i++) {
+ for (i = 0; i < UPRV_LENGTHOF(fixedWidth); i++) {
cnv = ucnv_open(fixedWidth[i], &status);
if (cnv == NULL || U_FAILURE(status)) {
log_data_err("Error open converter: %s - %s \n", fixedWidth[i], u_errorName(status));
@@ -5582,7 +5586,7 @@ TestIsFixedWidth() {
ucnv_close(cnv);
}
- for (i = 0; i < LENGTHOF(notFixedWidth); i++) {
+ for (i = 0; i < UPRV_LENGTHOF(notFixedWidth); i++) {
cnv = ucnv_open(notFixedWidth[i], &status);
if (cnv == NULL || U_FAILURE(status)) {
log_data_err("Error open converter: %s - %s \n", notFixedWidth[i], u_errorName(status));
« no previous file with comments | « source/test/cintltst/nfsprep.c ('k') | source/test/cintltst/reapits.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698