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

Unified Diff: source/test/intltest/itspoof.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/itrbnf.cpp ('k') | source/test/intltest/itutil.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/test/intltest/itspoof.cpp
diff --git a/source/test/intltest/itspoof.cpp b/source/test/intltest/itspoof.cpp
index b5b90e27e4e31cea47b4bc0d038e9e608afab6f0..42869a738ceafe5038c54541c5c3187979802446 100644
--- a/source/test/intltest/itspoof.cpp
+++ b/source/test/intltest/itspoof.cpp
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 2011-2014, International Business Machines Corporation
+* Copyright (C) 2011-2015, International Business Machines Corporation
* and others. All Rights Reserved.
**********************************************************************
*/
@@ -177,6 +177,9 @@ void IntlTestSpoof::testSpoofAPI() {
// Unicode data file confusables.txt
// Test cases chosen for substitutions of various lengths, and
// membership in different mapping tables.
+// Note: for ICU 55, all tables collapsed to the MA table data.
+// TODO: for ICU 56 with Unicode 8, revisit this test.
+//
void IntlTestSpoof::testSkeleton() {
const uint32_t ML = 0;
const uint32_t SL = USPOOF_SINGLE_SCRIPT_CONFUSABLE;
@@ -184,49 +187,42 @@ void IntlTestSpoof::testSkeleton() {
const uint32_t SA = USPOOF_SINGLE_SCRIPT_CONFUSABLE | USPOOF_ANY_CASE;
TEST_SETUP
- // A long "identifier" that will overflow implementation stack buffers, forcing heap allocations.
- CHECK_SKELETON(SL, " A 1ong \\u02b9identifier' that will overflow implementation stack buffers, forcing heap allocations."
- " A 1ong 'identifier' that will overflow implementation stack buffers, forcing heap allocations."
- " A 1ong 'identifier' that will overflow implementation stack buffers, forcing heap allocations."
- " A 1ong 'identifier' that will overflow implementation stack buffers, forcing heap allocations.",
-
- " A long 'identifier' that vvill overflovv irnplernentation stack buffers, forcing heap allocations."
- " A long 'identifier' that vvill overflovv irnplernentation stack buffers, forcing heap allocations."
- " A long 'identifier' that vvill overflovv irnplernentation stack buffers, forcing heap allocations."
- " A long 'identifier' that vvill overflovv irnplernentation stack buffers, forcing heap allocations.")
-
CHECK_SKELETON(SL, "nochange", "nochange");
+ CHECK_SKELETON(SA, "nochange", "nochange");
+ CHECK_SKELETON(ML, "nochange", "nochange");
+ CHECK_SKELETON(MA, "nochange", "nochange");
CHECK_SKELETON(MA, "love", "love");
CHECK_SKELETON(MA, "1ove", "love"); // Digit 1 to letter l
CHECK_SKELETON(ML, "OOPS", "OOPS");
- CHECK_SKELETON(ML, "00PS", "00PS"); // Digit 0 unchanged in lower case mode.
+ CHECK_SKELETON(ML, "00PS", "OOPS");
CHECK_SKELETON(MA, "OOPS", "OOPS");
CHECK_SKELETON(MA, "00PS", "OOPS"); // Digit 0 to letter O in any case mode only
CHECK_SKELETON(SL, "\\u059c", "\\u0301");
CHECK_SKELETON(SL, "\\u2A74", "\\u003A\\u003A\\u003D");
CHECK_SKELETON(SL, "\\u247E", "\\u0028\\u006C\\u006C\\u0029"); // "(ll)"
- CHECK_SKELETON(SL, "\\uFDFB", "\\u062C\\u0644\\u0020\\u062C\\u0644\\u0627\\u0644\\u0647");
+ CHECK_SKELETON(SL, "\\uFDFB", "\\u062C\\u0644\\u0020\\u062C\\u0644\\u006c\\u0644\\u006f");
// This mapping exists in the ML and MA tables, does not exist in SL, SA
- //0C83 ; 0C03 ;
- CHECK_SKELETON(SL, "\\u0C83", "\\u0C83");
- CHECK_SKELETON(SA, "\\u0C83", "\\u0C83");
+ // 0C83 ; 0983 ; ML
+ // 0C83 ; 0983 ; MA
+ //
+
+ CHECK_SKELETON(SL, "\\u0C83", "\\u0983");
+ CHECK_SKELETON(SA, "\\u0C83", "\\u0983");
CHECK_SKELETON(ML, "\\u0C83", "\\u0983");
CHECK_SKELETON(MA, "\\u0C83", "\\u0983");
- // 0391 ; 0041 ;
- // This mapping exists only in the MA table.
+ // 0391 mappings exist only in MA and SA tables.
CHECK_SKELETON(MA, "\\u0391", "A");
- CHECK_SKELETON(SA, "\\u0391", "\\u0391");
- CHECK_SKELETON(ML, "\\u0391", "\\u0391");
- CHECK_SKELETON(SL, "\\u0391", "\\u0391");
+ CHECK_SKELETON(SA, "\\u0391", "A");
+ CHECK_SKELETON(ML, "\\u0391", "A");
+ CHECK_SKELETON(SL, "\\u0391", "A");
- // 13CF ; 0062 ;
- // This mapping exists in the ML and MA tables
+ // 13CF Mappings in all four tables, different in MA.
CHECK_SKELETON(ML, "\\u13CF", "b");
CHECK_SKELETON(MA, "\\u13CF", "b");
- CHECK_SKELETON(SL, "\\u13CF", "\\u13CF");
- CHECK_SKELETON(SA, "\\u13CF", "\\u13CF");
+ CHECK_SKELETON(SL, "\\u13CF", "b");
+ CHECK_SKELETON(SA, "\\u13CF", "b");
// 0022 ; 0027 0027 ;
// all tables.
@@ -235,10 +231,11 @@ void IntlTestSpoof::testSkeleton() {
CHECK_SKELETON(ML, "\\u0022", "\\u0027\\u0027");
CHECK_SKELETON(MA, "\\u0022", "\\u0027\\u0027");
- // 017F ; 0066 ;
- // This mapping exists in the SA and MA tables
+ // 017F mappings exist only in MA and SA tables.
CHECK_SKELETON(MA, "\\u017F", "f");
CHECK_SKELETON(SA, "\\u017F", "f");
+ CHECK_SKELETON(ML, "\\u017F", "f");
+ CHECK_SKELETON(SL, "\\u017F", "f");
TEST_TEARDOWN;
}
« no previous file with comments | « source/test/intltest/itrbnf.cpp ('k') | source/test/intltest/itutil.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698