OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |