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

Side by Side Diff: base/i18n/time_formatting_unittest.cc

Issue 878723002: Upgrade ICU to 54.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add en-GB display name test Created 5 years, 10 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 | « base/i18n/break_iterator.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/i18n/time_formatting.h" 5 #include "base/i18n/time_formatting.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 151
152 TEST(TimeFormattingTest, TimeFormatDateGB) { 152 TEST(TimeFormattingTest, TimeFormatDateGB) {
153 // See third_party/icu/source/data/locales/en_GB.txt. 153 // See third_party/icu/source/data/locales/en_GB.txt.
154 // The date patterns are "EEEE, d MMMM y", "d MMM y", and "dd/MM/yyyy". 154 // The date patterns are "EEEE, d MMMM y", "d MMM y", and "dd/MM/yyyy".
155 i18n::SetICUDefaultLocale("en_GB"); 155 i18n::SetICUDefaultLocale("en_GB");
156 156
157 Time time(Time::FromLocalExploded(kTestDateTimeExploded)); 157 Time time(Time::FromLocalExploded(kTestDateTimeExploded));
158 158
159 EXPECT_EQ(ASCIIToUTF16("30 Apr 2011"), TimeFormatShortDate(time)); 159 EXPECT_EQ(ASCIIToUTF16("30 Apr 2011"), TimeFormatShortDate(time));
160 EXPECT_EQ(ASCIIToUTF16("30/04/2011"), TimeFormatShortDateNumeric(time)); 160 EXPECT_EQ(ASCIIToUTF16("30/04/2011"), TimeFormatShortDateNumeric(time));
161 EXPECT_EQ(ASCIIToUTF16("30/04/2011 15:42:07"), 161 EXPECT_EQ(ASCIIToUTF16("30/04/2011, 15:42:07"),
162 TimeFormatShortDateAndTime(time)); 162 TimeFormatShortDateAndTime(time));
163 EXPECT_EQ(ASCIIToUTF16("30/04/2011 15:42:07 ") + GetShortTimeZone(), 163 EXPECT_EQ(ASCIIToUTF16("30/04/2011, 15:42:07 ") + GetShortTimeZone(),
164 TimeFormatShortDateAndTimeWithTimeZone(time)); 164 TimeFormatShortDateAndTimeWithTimeZone(time));
165 EXPECT_EQ(ASCIIToUTF16("Saturday, 30 April 2011 15:42:07"), 165 EXPECT_EQ(ASCIIToUTF16("Saturday, 30 April 2011 at 15:42:07"),
166 TimeFormatFriendlyDateAndTime(time)); 166 TimeFormatFriendlyDateAndTime(time));
167 EXPECT_EQ(ASCIIToUTF16("Saturday, 30 April 2011"), 167 EXPECT_EQ(ASCIIToUTF16("Saturday, 30 April 2011"),
168 TimeFormatFriendlyDate(time)); 168 TimeFormatFriendlyDate(time));
169 } 169 }
170 170
171 } // namespace 171 } // namespace
172 } // namespace base 172 } // namespace base
OLDNEW
« no previous file with comments | « base/i18n/break_iterator.cc ('k') | base/test/test_suite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698