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

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

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 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/intltest/tufmtts.cpp ('k') | source/test/intltest/tztest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/intltest/tzfmttst.cpp
diff --git a/source/test/intltest/tzfmttst.cpp b/source/test/intltest/tzfmttst.cpp
index c3a03317cc40b4957e909358b1fdc76bdf706dd0..8a7735afe81367fe1b159ba6d0d892605fbdd399 100644
--- a/source/test/intltest/tzfmttst.cpp
+++ b/source/test/intltest/tzfmttst.cpp
@@ -1,6 +1,6 @@
/*
*******************************************************************************
-* Copyright (C) 2007-2014, International Business Machines Corporation and *
+* Copyright (C) 2007-2015, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
*/
@@ -678,11 +678,7 @@ TimeZoneFormatTest::TestTimeRoundTrip(void) {
data.END_TIME = END_TIME;
data.numDone = 0;
-#if (ICU_USE_THREADS==0)
- TestTimeRoundTripThread fakeThread(*this, data, 0);
- fakeThread.run();
-#else
- TestTimeRoundTripThread **threads = new TestTimeRoundTripThread*[threadCount];
+ TestTimeRoundTripThread **threads = new TestTimeRoundTripThread*[nThreads];
int32_t i;
for (i = 0; i < nThreads; i++) {
threads[i] = new TestTimeRoundTripThread(*this, data, i);
@@ -691,16 +687,11 @@ TimeZoneFormatTest::TestTimeRoundTrip(void) {
}
}
- UBool done = false;
- while (true) {
- umtx_lock(NULL);
- if (data.numDone == nLocales) {
- done = true;
- }
- umtx_unlock(NULL);
- if (done)
- break;
- SimpleThread::sleep(1000);
+ for (i = 0; i < nThreads; i++) {
+ threads[i]->join();
+ }
+ if (data.numDone != nLocales) {
+ errln("%s:%d data.numDone = %d, nLocales = %d", __FILE__, __LINE__, data.numDone, nLocales);
}
for (i = 0; i < nThreads; i++) {
@@ -708,7 +699,6 @@ TimeZoneFormatTest::TestTimeRoundTrip(void) {
}
delete [] threads;
-#endif
UDate total = 0;
logln("### Elapsed time by patterns ###");
for (int32_t i = 0; i < NUM_PATTERNS; i++) {
@@ -960,7 +950,7 @@ TimeZoneFormatTest::TestISOFormat(void) {
// Formatting
UErrorCode status = U_ZERO_ERROR;
- LocalPointer<SimpleDateFormat> sdf(new SimpleDateFormat(status));
+ LocalPointer<SimpleDateFormat> sdf(new SimpleDateFormat(status), status);
if (U_FAILURE(status)) {
dataerrln("Fail new SimpleDateFormat: %s", u_errorName(status));
return;
« no previous file with comments | « source/test/intltest/tufmtts.cpp ('k') | source/test/intltest/tztest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698