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

Side by Side Diff: source/test/intltest/regcoll.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 unified diff | Download patch
« no previous file with comments | « source/test/intltest/rbbitst.cpp ('k') | source/test/intltest/regextst.h » ('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: 2 * COPYRIGHT:
3 * Copyright (c) 1997-2014, International Business Machines Corporation and 3 * Copyright (c) 1997-2014, International Business Machines Corporation and
4 * others. All Rights Reserved. 4 * others. All Rights Reserved.
5 ********************************************************************/ 5 ********************************************************************/
6 6
7 #include "unicode/utypes.h" 7 #include "unicode/utypes.h"
8 8
9 #if !UCONFIG_NO_COLLATION 9 #if !UCONFIG_NO_COLLATION
10 10
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 rules += "& oe ,"; 94 rules += "& oe ,";
95 rules += (UChar)0x1530; 95 rules += (UChar)0x1530;
96 rules += " ,O"; 96 rules += " ,O";
97 rules += "& OE ,O"; 97 rules += "& OE ,O";
98 rules += (UChar)0x3080; 98 rules += (UChar)0x3080;
99 rules += "& OE ,"; 99 rules += "& OE ,";
100 rules += (UChar)0x1520; 100 rules += (UChar)0x1520;
101 rules += "< p ,P"; 101 rules += "< p ,P";
102 102
103 // Build a collator containing expanding characters 103 // Build a collator containing expanding characters
104 LocalPointer<RuleBasedCollator> c1(new RuleBasedCollator(rules, status)); 104 LocalPointer<RuleBasedCollator> c1(new RuleBasedCollator(rules, status), sta tus);
105
106 // Build another using the rules from the first
107 LocalPointer<RuleBasedCollator> c2(new RuleBasedCollator(c1->getRules(), sta tus));
108 if (U_FAILURE(status)) { 105 if (U_FAILURE(status)) {
109 errln("RuleBasedCollator(rule string) failed - %s", u_errorName(status)) ; 106 errln("RuleBasedCollator(rule string) failed - %s", u_errorName(status)) ;
110 return; 107 return;
111 } 108 }
112 109
110 // Build another using the rules from the first
111 LocalPointer<RuleBasedCollator> c2(new RuleBasedCollator(c1->getRules(), sta tus), status);
112 if (U_FAILURE(status)) {
113 errln("RuleBasedCollator(rule string from other RBC) failed - %s", u_err orName(status));
114 return;
115 }
116
113 // Make sure they're the same 117 // Make sure they're the same
114 if (!(c1->getRules() == c2->getRules())) 118 if (!(c1->getRules() == c2->getRules()))
115 { 119 {
116 errln("Rules are not equal"); 120 errln("Rules are not equal");
117 } 121 }
118 } 122 }
119 123
120 // @bug 4053636 124 // @bug 4053636
121 // 125 //
122 // Collator thinks "black-bird" == "black" 126 // Collator thinks "black-bird" == "black"
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 TESTCASE_AUTO(Test4146160); 1475 TESTCASE_AUTO(Test4146160);
1472 TESTCASE_AUTO(Test4179216); 1476 TESTCASE_AUTO(Test4179216);
1473 TESTCASE_AUTO(TestT7189); 1477 TESTCASE_AUTO(TestT7189);
1474 TESTCASE_AUTO(TestCaseFirstCompression); 1478 TESTCASE_AUTO(TestCaseFirstCompression);
1475 TESTCASE_AUTO(TestTrailingComment); 1479 TESTCASE_AUTO(TestTrailingComment);
1476 TESTCASE_AUTO(TestBeforeWithTooStrongAfter); 1480 TESTCASE_AUTO(TestBeforeWithTooStrongAfter);
1477 TESTCASE_AUTO_END; 1481 TESTCASE_AUTO_END;
1478 } 1482 }
1479 1483
1480 #endif /* #if !UCONFIG_NO_COLLATION */ 1484 #endif /* #if !UCONFIG_NO_COLLATION */
OLDNEW
« no previous file with comments | « source/test/intltest/rbbitst.cpp ('k') | source/test/intltest/regextst.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698