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

Unified Diff: source/test/perf/dicttrieperf/dicttrieperf.cpp

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/perf/convperf/convperf.cpp ('k') | source/test/perf/howExpensiveIs/howExpensiveIs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/perf/dicttrieperf/dicttrieperf.cpp
diff --git a/source/test/perf/dicttrieperf/dicttrieperf.cpp b/source/test/perf/dicttrieperf/dicttrieperf.cpp
index 3400e0e863d50656ba59bceb626a9d008157f4d8..9b3c284c776bd23a4b61ea637a83e664fa723d72 100644
--- a/source/test/perf/dicttrieperf/dicttrieperf.cpp
+++ b/source/test/perf/dicttrieperf/dicttrieperf.cpp
@@ -1,6 +1,6 @@
/*
**********************************************************************
- * Copyright (C) 2010-2012, International Business Machines
+ * Copyright (C) 2010-2014, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* file name: dicttrieperf.cpp
@@ -37,8 +37,7 @@
#include "ucbuf.h" // struct ULine
#include "uoptions.h"
#include "uvectr32.h"
-
-#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0]))
+#include "cmemory.h" // for UPRV_LENGTHOF
// Test object.
class DictionaryTriePerfTest : public UPerfTest {
@@ -449,7 +448,7 @@ public:
utext_openUChars(&text, lines[i].name, lines[i].len, pErrorCode);
int32_t count=0;
ucharsTrieMatches(*trie, &text, lines[i].len,
- lengths, count, LENGTHOF(lengths));
+ lengths, count, UPRV_LENGTHOF(lengths));
if(count==0 || lengths[count-1]!=lines[i].len) {
fprintf(stderr, "word %ld (0-based) not found\n", (long)i);
}
@@ -598,7 +597,7 @@ public:
utext_openUChars(&text, lines[i].name, lines[i].len, pErrorCode);
int32_t count=0;
bytesTrieMatches(*trie, &text, lines[i].len,
- lengths, count, LENGTHOF(lengths));
+ lengths, count, UPRV_LENGTHOF(lengths));
if(count==0 || lengths[count-1]!=lines[i].len) {
fprintf(stderr, "word %ld (0-based) not found\n", (long)i);
}
« no previous file with comments | « source/test/perf/convperf/convperf.cpp ('k') | source/test/perf/howExpensiveIs/howExpensiveIs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698