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

Side by Side Diff: patches/infinite-recursion.patch

Issue 1621943002: ICU 56 step 4: Apply post-56 fixes for measure/date format (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@56goog
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 | « patches/gb_table.patch ('k') | patches/locale_google.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 Index: /icu/trunk/source/i18n/filteredbrk.cpp
2 ===================================================================
3 --- /icu/trunk/source/i18n/filteredbrk.cpp (revision 36671)
4 +++ /icu/trunk/source/i18n/filteredbrk.cpp (revision 36672)
5 @@ -148,5 +148,5 @@
6 virtual BreakIterator* clone(void) const { return new SimpleFilteredSentenceB reakIterator(*this); }
7 virtual UClassID getDynamicClassID(void) const { return NULL; }
8 - virtual UBool operator==(const BreakIterator& o) const { if(*this==o) return true; return false; }
9 + virtual UBool operator==(const BreakIterator& o) const { if(this==&o) return true; return false; }
10
11 /* -- text modifying -- */
12 Index: /icu/trunk/source/test/intltest/rbbiapts.cpp
13 ===================================================================
14 --- /icu/trunk/source/test/intltest/rbbiapts.cpp (revision 36671)
15 +++ /icu/trunk/source/test/intltest/rbbiapts.cpp (revision 36672)
16 @@ -1227,4 +1227,5 @@
17 LocalPointer<BreakIterator> baseBI;
18 LocalPointer<BreakIterator> filteredBI;
19 + LocalPointer<BreakIterator> frenchBI;
20
21 const UnicodeString text("In the meantime Mr. Weston arrived with his small s hip, which he had now recovered. Capt. Gorges, who informed the Sgt. here that o ne purpose of his going east was to meet with Mr. Weston, took this opportunity to call him to account for some abuses he had to lay to his charge."); // (Willi am Bradford, public domain. http://catalog.hathitrust.org/Record/008651224 ) - e dited.
22 @@ -1241,9 +1242,9 @@
23 TEST_ASSERT_SUCCESS(status);
24
25 - logln("Building new BI\n");
26 + logln("Building new BI\n");
27 filteredBI.adoptInstead(builder->build(baseBI.orphan(), status));
28 TEST_ASSERT_SUCCESS(status);
29
30 - if (U_SUCCESS(status)) {
31 + if (U_SUCCESS(status)) {
32 logln("Testing:");
33 filteredBI->setText(text);
34 @@ -1375,5 +1376,4 @@
35 }
36
37 -#if 0
38 // reenable once french is in
39 {
40 @@ -1387,17 +1387,31 @@
41
42 logln("Building new BI\n");
43 - filteredBI.adoptInstead(builder->build(baseBI.orphan(), status));
44 - TEST_ASSERT_SUCCESS(status);
45 -
46 - if(filteredBI.isValid()) {
47 + frenchBI.adoptInstead(builder->build(baseBI.orphan(), status));
48 + TEST_ASSERT_SUCCESS(status);
49 +
50 + if(frenchBI.isValid()) {
51 logln("Testing:");
52 - filteredBI->setText(text);
53 - TEST_ASSERT(20 == filteredBI->next());
54 - TEST_ASSERT(84 == filteredBI->next());
55 + UnicodeString frText("C'est MM. Duval.");
56 + frenchBI->setText(frText);
57 + TEST_ASSERT(16 == frenchBI->next());
58 + TEST_ASSERT(BreakIterator::DONE == frenchBI->next());
59 + frenchBI->first();
60 + prtbrks(frenchBI.getAlias(), frText, *this);
61 + logln("Testing against English:");
62 + filteredBI->setText(frText);
63 + TEST_ASSERT(10 == filteredBI->next()); // wrong for french, but filterBI is english.
64 + TEST_ASSERT(16 == filteredBI->next());
65 + TEST_ASSERT(BreakIterator::DONE == filteredBI->next());
66 filteredBI->first();
67 - prtbrks(filteredBI.getAlias(), text, *this);
68 - }
69 + prtbrks(filteredBI.getAlias(), frText, *this);
70 +
71 + // Verify ==
72 + TEST_ASSERT_TRUE(*frenchBI == *frenchBI);
73 + TEST_ASSERT_TRUE(*filteredBI != *frenchBI);
74 + TEST_ASSERT_TRUE(*frenchBI != *filteredBI);
75 + } else {
76 + dataerrln("French BI: not valid.");
77 + }
78 }
79 -#endif
80
81 #else
OLDNEW
« no previous file with comments | « patches/gb_table.patch ('k') | patches/locale_google.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698