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

Side by Side Diff: Source/web/tests/LocaleICUTest.cpp

Issue 482753002: Use StringBuilder::appendLiteral() / StringBuilder::append(char) when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/web/WebPageSerializerImpl.cpp ('k') | no next file » | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 return false; 54 return false;
55 for (unsigned index = 0; index < m_labels.size(); ++index) 55 for (unsigned index = 0; index < m_labels.size(); ++index)
56 if (m_labels[index] != other.m_labels[index]) 56 if (m_labels[index] != other.m_labels[index])
57 return false; 57 return false;
58 return true; 58 return true;
59 } 59 }
60 60
61 String toString() const 61 String toString() const
62 { 62 {
63 StringBuilder builder; 63 StringBuilder builder;
64 builder.append("labels("); 64 builder.appendLiteral("labels(");
65 for (unsigned index = 0; index < m_labels.size(); ++index) { 65 for (unsigned index = 0; index < m_labels.size(); ++index) {
66 if (index) 66 if (index)
67 builder.append(", "); 67 builder.appendLiteral(", ");
68 builder.append('"'); 68 builder.append('"');
69 builder.append(m_labels[index]); 69 builder.append(m_labels[index]);
70 builder.append('"'); 70 builder.append('"');
71 } 71 }
72 builder.append(')'); 72 builder.append(')');
73 return builder.toString(); 73 return builder.toString();
74 } 74 }
75 75
76 private: 76 private:
77 Vector<String> m_labels; 77 Vector<String> m_labels;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // Test some of major locales. 273 // Test some of major locales.
274 testNumbers("ar"); 274 testNumbers("ar");
275 testNumbers("de_DE"); 275 testNumbers("de_DE");
276 testNumbers("es_ES"); 276 testNumbers("es_ES");
277 testNumbers("ja_JP"); 277 testNumbers("ja_JP");
278 testNumbers("ko_KR"); 278 testNumbers("ko_KR");
279 testNumbers("zh_CN"); 279 testNumbers("zh_CN");
280 testNumbers("zh_HK"); 280 testNumbers("zh_HK");
281 testNumbers("zh_TW"); 281 testNumbers("zh_TW");
282 } 282 }
OLDNEW
« no previous file with comments | « Source/web/WebPageSerializerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698