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

Unified Diff: source/test/threadtest/converttest.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/threadtest/Makefile.in ('k') | source/test/threadtest/stringtest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/threadtest/converttest.cpp
diff --git a/source/test/threadtest/converttest.cpp b/source/test/threadtest/converttest.cpp
deleted file mode 100644
index 8de22efa786ea623be94fc46d422a61517bd5f09..0000000000000000000000000000000000000000
--- a/source/test/threadtest/converttest.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-//
-//********************************************************************
-// Copyright (C) 2002-2003, International Business Machines
-// Corporation and others. All Rights Reserved.
-//********************************************************************
-//
-// File converttest.cpp
-//
-
-#include "threadtest.h"
-#include "unicode/utypes.h"
-#include "unicode/ucnv.h"
-#include "unicode/uclean.h"
-#include "stdio.h"
-
-U_CAPI UBool U_EXPORT2 ucnv_cleanup();
-
-class ConvertThreadTest: public AbstractThreadTest {
-public:
- ConvertThreadTest();
- virtual ~ConvertThreadTest();
- virtual void check();
- virtual void runOnce();
-
-private:
- UConverter *fCnv;
-};
-
-
-ConvertThreadTest::ConvertThreadTest() {
- UErrorCode err = U_ZERO_ERROR;
-
- fCnv = ucnv_open("gb18030", &err);
- if (U_FAILURE(err)) {
- fprintf(stderr, "ConvertTest - could not ucnv_open(\"gb18030\")\n");
- fCnv = NULL;
- }
-};
-
-
-ConvertThreadTest::~ConvertThreadTest() {
- ucnv_close(fCnv);
- fCnv = 0;
-}
-
-void ConvertThreadTest::runOnce() {
- UErrorCode err = U_ZERO_ERROR;
- UConverter *cnv1;
- UConverter *cnv2;
- char buf[U_CNV_SAFECLONE_BUFFERSIZE];
- int32_t bufSize = U_CNV_SAFECLONE_BUFFERSIZE;
-
- cnv1 = ucnv_open("shift_jis", &err);
- if (U_FAILURE(err)) {
- fprintf(stderr, "ucnv_open(\"shift_jis\") failed.\n");
- }
-
- cnv2 = ucnv_safeClone(fCnv, // The source converter, common to all threads.
- buf,
- &bufSize,
- &err);
- if (U_FAILURE(err)) {
- fprintf(stderr, "ucnv_safeClone() failed.\n");
- }
- ucnv_close(cnv1);
- ucnv_close(cnv2);
- ucnv_flushCache();
-}
-
-void ConvertThreadTest::check() {
- UErrorCode err = U_ZERO_ERROR;
-
- if (fCnv) {ucnv_close(fCnv);}
- //if (ucnv_cleanup () == FALSE) {
- // fprintf(stderr, "ucnv_cleanup() failed - cache was not empty.\n");
- //}
- fCnv = ucnv_open("gb18030", &err);
- if (U_FAILURE(err)) {
- fprintf(stderr, "ConvertTest::check() - could not redo ucnv_open(\"gb18030\")\n");
- fCnv = NULL;
- }
-}
-
-
-AbstractThreadTest *createConvertTest() {
- return new ConvertThreadTest();
-}
-
« no previous file with comments | « source/test/threadtest/Makefile.in ('k') | source/test/threadtest/stringtest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698