Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(374)

Unified Diff: source/test/intltest/dtfmrgts.cpp

Issue 285520043: ticket:12012: Replace all sizeof p / sizeof *p with UPRV_LENGTHOF(). (Closed) Base URL: svn+ssh://source.icu-project.org/repos/icu/icu/trunk
Patch Set: Code review. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/test/intltest/currcoll.cpp ('k') | source/test/intltest/dtfmttst.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/intltest/dtfmrgts.cpp
diff --git a/source/test/intltest/dtfmrgts.cpp b/source/test/intltest/dtfmrgts.cpp
index c4db716a7396de666d2801709e895190152a0ccf..131fd794d48ba21d178188b78a43fa6cf228392c 100644
--- a/source/test/intltest/dtfmrgts.cpp
+++ b/source/test/intltest/dtfmrgts.cpp
@@ -1,6 +1,6 @@
/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2015, International Business Machines Corporation and
+ * Copyright (c) 1997-2016, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
@@ -15,6 +15,7 @@
#include "unicode/datefmt.h"
#include "unicode/simpletz.h"
#include "unicode/resbund.h"
+#include "cmemory.h"
// *****************************************************************************
// class DateFormatRegressionTest
@@ -1133,7 +1134,7 @@ void DateFormatRegressionTest::Test4182066(void) {
"09/12/+1",
"09/12/001",
};
- int32_t STRINGS_COUNT = (int32_t)(sizeof(STRINGS) / sizeof(STRINGS[0]));
+ int32_t STRINGS_COUNT = UPRV_LENGTHOF(STRINGS);
UDate FAIL_DATE = (UDate) 0;
UDate DATES[] = {
date(2000-1900, UCAL_FEBRUARY, 29),
@@ -1327,7 +1328,7 @@ void DateFormatRegressionTest::Test1684(void)
new Test1684Data(2001,12,30, /*2002, 1, 6,*/ 2002,1,1,UCAL_SUNDAY, "2002 01 01 Sun", "2001 12 06 Sun")
};
-#define kTest1684Count ((int32_t)(sizeof(tests)/sizeof(tests[0])))
+#define kTest1684Count UPRV_LENGTHOF(tests)
int32_t pass = 0, error = 0, warning = 0;
int32_t i;
« no previous file with comments | « source/test/intltest/currcoll.cpp ('k') | source/test/intltest/dtfmttst.cpp » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b