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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 TEST_F(LocaleWinTest, dateFormat) | 206 TEST_F(LocaleWinTest, dateFormat) |
207 { | 207 { |
208 EXPECT_STREQ("y-M-d", LocaleWin::dateFormat("y-M-d").utf8().data()); | 208 EXPECT_STREQ("y-M-d", LocaleWin::dateFormat("y-M-d").utf8().data()); |
209 EXPECT_STREQ("''yy'-'''MM'''-'dd", LocaleWin::dateFormat("''yy-''MM''-dd").u
tf8().data()); | 209 EXPECT_STREQ("''yy'-'''MM'''-'dd", LocaleWin::dateFormat("''yy-''MM''-dd").u
tf8().data()); |
210 EXPECT_STREQ("yyyy'-''''-'MMM'''''-'dd", LocaleWin::dateFormat("yyyy-''''-MM
M''''-dd").utf8().data()); | 210 EXPECT_STREQ("yyyy'-''''-'MMM'''''-'dd", LocaleWin::dateFormat("yyyy-''''-MM
M''''-dd").utf8().data()); |
211 EXPECT_STREQ("yyyy'-'''''MMMM-dd", LocaleWin::dateFormat("yyyy-''''MMMM-dd")
.utf8().data()); | 211 EXPECT_STREQ("yyyy'-'''''MMMM-dd", LocaleWin::dateFormat("yyyy-''''MMMM-dd")
.utf8().data()); |
212 } | 212 } |
213 | 213 |
214 TEST_F(LocaleWinTest, monthFormat) | 214 TEST_F(LocaleWinTest, monthFormat) |
215 { | 215 { |
216 EXPECT_STREQ("MMMM, yyyy", monthFormat(EnglishUS).utf8().data()); | 216 // Month format for EnglishUS: |
| 217 // "MMMM, yyyy" on Windows 7 or older. |
| 218 // "MMMM yyyy" on Window 8 or later. |
| 219 EXPECT_STREQ("MMMM yyyy", monthFormat(EnglishUS).replaceWithLiteral(',', "")
.utf8().data()); |
217 EXPECT_STREQ("MMMM yyyy", monthFormat(FrenchFR).utf8().data()); | 220 EXPECT_STREQ("MMMM yyyy", monthFormat(FrenchFR).utf8().data()); |
218 EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat(JapaneseJP).utf8()
.data()); | 221 EXPECT_STREQ("yyyy\xE5\xB9\xB4M\xE6\x9C\x88", monthFormat(JapaneseJP).utf8()
.data()); |
219 } | 222 } |
220 | 223 |
221 TEST_F(LocaleWinTest, timeFormat) | 224 TEST_F(LocaleWinTest, timeFormat) |
222 { | 225 { |
223 EXPECT_STREQ("h:mm:ss a", timeFormat(EnglishUS).utf8().data()); | 226 EXPECT_STREQ("h:mm:ss a", timeFormat(EnglishUS).utf8().data()); |
224 EXPECT_STREQ("HH:mm:ss", timeFormat(FrenchFR).utf8().data()); | 227 EXPECT_STREQ("HH:mm:ss", timeFormat(FrenchFR).utf8().data()); |
225 EXPECT_STREQ("H:mm:ss", timeFormat(JapaneseJP).utf8().data()); | 228 EXPECT_STREQ("H:mm:ss", timeFormat(JapaneseJP).utf8().data()); |
226 } | 229 } |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 testNumbers(Spanish); | 300 testNumbers(Spanish); |
298 testNumbers(Persian); | 301 testNumbers(Persian); |
299 testNumbers(JapaneseJP); | 302 testNumbers(JapaneseJP); |
300 testNumbers(KoreanKR); | 303 testNumbers(KoreanKR); |
301 testNumbers(ChineseCN); | 304 testNumbers(ChineseCN); |
302 testNumbers(ChineseHK); | 305 testNumbers(ChineseHK); |
303 testNumbers(ChineseTW); | 306 testNumbers(ChineseTW); |
304 } | 307 } |
305 | 308 |
306 } // namespace blink | 309 } // namespace blink |
OLD | NEW |