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/intltest/testutil.cpp

Issue 2435373002: Delete source/test (Closed)
Patch Set: Created 4 years, 2 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/testutil.h ('k') | source/test/intltest/textfile.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/intltest/testutil.cpp
diff --git a/source/test/intltest/testutil.cpp b/source/test/intltest/testutil.cpp
deleted file mode 100644
index cab56bae702afb12d5de656e152447aa25f8d2f6..0000000000000000000000000000000000000000
--- a/source/test/intltest/testutil.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-**********************************************************************
-* Copyright (C) 2001-2009, International Business Machines
-* Corporation and others. All Rights Reserved.
-**********************************************************************
-* Date Name Description
-* 05/23/00 aliu Creation.
-**********************************************************************
-*/
-
-#include "unicode/unistr.h"
-#include "testutil.h"
-
-static const UChar HEX[16]={48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70};
-
-UnicodeString &TestUtility::appendHex(UnicodeString &buf, UChar32 ch) {
- if (ch >= 0x10000) {
- if (ch >= 0x100000) {
- buf.append(HEX[0xF&(ch>>20)]);
- }
- buf.append(HEX[0xF&(ch>>16)]);
- }
- buf.append(HEX[0xF&(ch>>12)]);
- buf.append(HEX[0xF&(ch>>8)]);
- buf.append(HEX[0xF&(ch>>4)]);
- buf.append(HEX[0xF&ch]);
- return buf;
-}
-
-UnicodeString TestUtility::hex(UChar32 ch) {
- UnicodeString buf;
- appendHex(buf, ch);
- return buf;
-}
-
-UnicodeString TestUtility::hex(const UnicodeString& s) {
- return hex(s, 44 /*,*/);
-}
-
-UnicodeString TestUtility::hex(const UnicodeString& s, UChar sep) {
- UnicodeString result;
- if (s.isEmpty()) return result;
- UChar32 c;
- for (int32_t i = 0; i < s.length(); i += U16_LENGTH(c)) {
- c = s.char32At(i);
- if (i > 0) {
- result.append(sep);
- }
- appendHex(result, c);
- }
- return result;
-}
-
-UnicodeString TestUtility::hex(const uint8_t* bytes, int32_t len) {
- UnicodeString buf;
- for (int32_t i = 0; i < len; ++i) {
- buf.append(HEX[0x0F & (bytes[i] >> 4)]);
- buf.append(HEX[0x0F & bytes[i]]);
- }
- return buf;
-}
« no previous file with comments | « source/test/intltest/testutil.h ('k') | source/test/intltest/textfile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698