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

Side by Side Diff: pkg/http_parser/test/http_date_test.dart

Issue 223023003: Extract an http_parser package from shelf. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/http_parser/pubspec.yaml ('k') | pkg/http_parser/test/media_type_test.dart » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library shelf.http_date_test; 5 library http_parser.http_date_test;
6 6
7 import 'package:shelf/src/util.dart'; 7 import 'package:http_parser/http_parser.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 9
10 void main() { 10 void main() {
11 group("parse", () { 11 group("parse", () {
12 group("RFC 1123", () { 12 group("RFC 1123", () {
13 test("parses the example date", () { 13 test("parses the example date", () {
14 var date = parseHttpDate("Sun, 06 Nov 1994 08:49:37 GMT"); 14 var date = parseHttpDate("Sun, 06 Nov 1994 08:49:37 GMT");
15 expect(date.day, equals(6)); 15 expect(date.day, equals(6));
16 expect(date.month, equals(DateTime.NOVEMBER)); 16 expect(date.month, equals(DateTime.NOVEMBER));
17 expect(date.year, equals(1994)); 17 expect(date.year, equals(1994));
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 throwsFormatException); 306 throwsFormatException);
307 }); 307 });
308 308
309 test("disallows trailing whitespace", () { 309 test("disallows trailing whitespace", () {
310 expect(() => parseHttpDate("Sun November 0 08:49:37 1994 "), 310 expect(() => parseHttpDate("Sun November 0 08:49:37 1994 "),
311 throwsFormatException); 311 throwsFormatException);
312 }); 312 });
313 }); 313 });
314 }); 314 });
315 } 315 }
OLDNEW
« no previous file with comments | « pkg/http_parser/pubspec.yaml ('k') | pkg/http_parser/test/media_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698