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

Side by Side Diff: Source/platform/text/UnicodeUtilitiesTest.cpp

Issue 1119663002: Making Unicode character names consistent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase patch Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « Source/platform/text/UnicodeUtilities.cpp ('k') | Source/web/PopupListBox.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 Yandex LLC. All rights reserved. 2 * Copyright (c) 2013 Yandex LLC. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 for (UChar character = 0x30A1; character <= 0x30FA; ++character) { 122 for (UChar character = 0x30A1; character <= 0x30FA; ++character) {
123 String str(nonKanaString); 123 String str(nonKanaString);
124 str.append(character); 124 str.append(character);
125 EXPECT_TRUE(containsKanaLetters(str)); 125 EXPECT_TRUE(containsKanaLetters(str));
126 } 126 }
127 } 127 }
128 128
129 TEST(WebCoreUnicodeUnit, FoldQuoteMarkOrSoftHyphenTest) 129 TEST(WebCoreUnicodeUnit, FoldQuoteMarkOrSoftHyphenTest)
130 { 130 {
131 const UChar charactersToFold[] = { 131 const UChar charactersToFold[] = {
132 hebrewPunctuationGershayim, leftDoubleQuotationMark, rightDoubleQuotatio nMark, 132 hebrewPunctuationGershayimCharacter, leftDoubleQuotationMarkCharacter, r ightDoubleQuotationMarkCharacter,
133 hebrewPunctuationGeresh, leftSingleQuotationMark, rightSingleQuotationMa rk, 133 hebrewPunctuationGereshCharacter, leftSingleQuotationMarkCharacter, righ tSingleQuotationMarkCharacter,
134 softHyphen 134 softHyphenCharacter
135 }; 135 };
136 136
137 String stringToFold(charactersToFold, WTF_ARRAY_LENGTH(charactersToFold)); 137 String stringToFold(charactersToFold, WTF_ARRAY_LENGTH(charactersToFold));
138 Vector<UChar> buffer; 138 Vector<UChar> buffer;
139 stringToFold.appendTo(buffer); 139 stringToFold.appendTo(buffer);
140 140
141 foldQuoteMarksAndSoftHyphens(stringToFold); 141 foldQuoteMarksAndSoftHyphens(stringToFold);
142 142
143 const String foldedString("\"\"\"\'\'\'\0", WTF_ARRAY_LENGTH(charactersToFol d)); 143 const String foldedString("\"\"\"\'\'\'\0", WTF_ARRAY_LENGTH(charactersToFol d));
144 EXPECT_EQ(stringToFold, foldedString); 144 EXPECT_EQ(stringToFold, foldedString);
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 voicedKanaString1, WTF_ARRAY_LENGTH(voicedKanaString1), 239 voicedKanaString1, WTF_ARRAY_LENGTH(voicedKanaString1),
240 voicedKanaString2, WTF_ARRAY_LENGTH(voicedKanaString2))); 240 voicedKanaString2, WTF_ARRAY_LENGTH(voicedKanaString2)));
241 241
242 voicedKanaString2[0] = 0x3043; 242 voicedKanaString2[0] = 0x3043;
243 EXPECT_FALSE(checkKanaStringsEqual( 243 EXPECT_FALSE(checkKanaStringsEqual(
244 voicedKanaString1, WTF_ARRAY_LENGTH(voicedKanaString1), 244 voicedKanaString1, WTF_ARRAY_LENGTH(voicedKanaString1),
245 voicedKanaString2, WTF_ARRAY_LENGTH(voicedKanaString2))); 245 voicedKanaString2, WTF_ARRAY_LENGTH(voicedKanaString2)));
246 } 246 }
247 247
248 } // namespace 248 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/text/UnicodeUtilities.cpp ('k') | Source/web/PopupListBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698