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

Unified Diff: tests/standalone/io/http_date_test.dart

Issue 13841005: Rename DateTime constants to full names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_date_test.dart
diff --git a/tests/standalone/io/http_date_test.dart b/tests/standalone/io/http_date_test.dart
index b16fb85cd7f1acbf2ae28820e793b37d4663f15d..df88afe34f27a03554846b3039de51fa5c5ff34e 100644
--- a/tests/standalone/io/http_date_test.dart
+++ b/tests/standalone/io/http_date_test.dart
@@ -15,18 +15,18 @@ part "../../../sdk/lib/io/socket.dart";
void testParseHttpDate() {
DateTime date;
- date = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
+ date = new DateTime.utc(1999, DateTime.JUNE, 11, 18, 46, 53, 0);
Expect.equals(date, _HttpUtils.parseDate("Fri, 11 Jun 1999 18:46:53 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Friday, 11-Jun-1999 18:46:53 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Fri Jun 11 18:46:53 1999"));
- date = new DateTime.utc(1970, DateTime.JAN, 1, 0, 0, 0, 0);
+ date = new DateTime.utc(1970, DateTime.JANUARY, 1, 0, 0, 0, 0);
Expect.equals(date, _HttpUtils.parseDate("Thu, 1 Jan 1970 00:00:00 GMT"));
Expect.equals(date,
_HttpUtils.parseDate("Thursday, 1-Jan-1970 00:00:00 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Thu Jan 1 00:00:00 1970"));
- date = new DateTime.utc(2012, DateTime.MAR, 5, 23, 59, 59, 0);
+ date = new DateTime.utc(2012, DateTime.MARCH, 5, 23, 59, 59, 0);
Expect.equals(date, _HttpUtils.parseDate("Mon, 5 Mar 2012 23:59:59 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Monday, 5-Mar-2012 23:59:59 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Mon Mar 5 23:59:59 2012"));
@@ -48,9 +48,9 @@ void testFormatParseHttpDate() {
Expect.equals(date, _HttpUtils.parseDate(formatted));
}
- test(1999, DateTime.JUN, 11, 18, 46, 53, "Fri, 11 Jun 1999 18:46:53 GMT");
- test(1970, DateTime.JAN, 1, 0, 0, 0, "Thu, 1 Jan 1970 00:00:00 GMT");
- test(2012, DateTime.MAR, 5, 23, 59, 59, "Mon, 5 Mar 2012 23:59:59 GMT");
+ test(1999, DateTime.JUNE, 11, 18, 46, 53, "Fri, 11 Jun 1999 18:46:53 GMT");
+ test(1970, DateTime.JANUARY, 1, 0, 0, 0, "Thu, 1 Jan 1970 00:00:00 GMT");
+ test(2012, DateTime.MARCH, 5, 23, 59, 59, "Mon, 5 Mar 2012 23:59:59 GMT");
}
void testParseHttpDateFailures() {
@@ -98,11 +98,11 @@ void testParseHttpCookieDate() {
Expect.equals(date, _HttpUtils.parseCookieDate(formatted));
}
- test(2012, DateTime.JUN, 19, 14, 15, 01, "tue, 19-jun-12 14:15:01 gmt");
- test(2021, DateTime.JUN, 09, 10, 18, 14, "Wed, 09-Jun-2021 10:18:14 GMT");
- test(2021, DateTime.JAN, 13, 22, 23, 01, "Wed, 13-Jan-2021 22:23:01 GMT");
- test(2013, DateTime.JAN, 15, 21, 47, 38, "Tue, 15-Jan-2013 21:47:38 GMT");
- test(1970, DateTime.JAN, 01, 00, 00, 01, "Thu, 01-Jan-1970 00:00:01 GMT");
+ test(2012, DateTime.JUNE, 19, 14, 15, 01, "tue, 19-jun-12 14:15:01 gmt");
+ test(2021, DateTime.JUNE, 09, 10, 18, 14, "Wed, 09-Jun-2021 10:18:14 GMT");
+ test(2021, DateTime.JANUARY, 13, 22, 23, 01, "Wed, 13-Jan-2021 22:23:01 GMT");
+ test(2013, DateTime.JANUARY, 15, 21, 47, 38, "Tue, 15-Jan-2013 21:47:38 GMT");
+ test(1970, DateTime.JANUARY, 01, 00, 00, 01, "Thu, 01-Jan-1970 00:00:01 GMT");
}
void main() {
« no previous file with comments | « tests/standalone/io/http_advanced_test.dart ('k') | tests/standalone/io/http_headers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698