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