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

Side by Side Diff: third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp

Issue 2143483002: Use the single char overload of append() when possible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 { 140 {
141 return m_tokens == other.m_tokens; 141 return m_tokens == other.m_tokens;
142 } 142 }
143 143
144 String toString() const 144 String toString() const
145 { 145 {
146 StringBuilder builder; 146 StringBuilder builder;
147 builder.append("Tokens("); 147 builder.append("Tokens(");
148 for (unsigned index = 0; index < m_tokens.size(); ++index) { 148 for (unsigned index = 0; index < m_tokens.size(); ++index) {
149 if (index) 149 if (index)
150 builder.append(","); 150 builder.append(',');
151 builder.append(m_tokens[index].toString()); 151 builder.append(m_tokens[index].toString());
152 } 152 }
153 builder.append(")"); 153 builder.append(')');
154 return builder.toString(); 154 return builder.toString();
155 } 155 }
156 156
157 private: 157 private:
158 Vector<Token> m_tokens; 158 Vector<Token> m_tokens;
159 }; 159 };
160 160
161 protected: 161 protected:
162 Tokens parse(const String& formatString) 162 Tokens parse(const String& formatString)
163 { 163 {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('O')); 326 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('O'));
327 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('P')); 327 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('P'));
328 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('R')); 328 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('R'));
329 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('T')); 329 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('T'));
330 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('U')); 330 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('U'));
331 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('V')); 331 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('V'));
332 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('X')); 332 EXPECT_EQ(DateTimeFormat::FieldTypeInvalid, single('X'));
333 } 333 }
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698