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

Side by Side Diff: test/http_date_test.dart

Issue 1169883002: Upgrade to the new test package. (Closed) Base URL: git@github.com:dart-lang/http_parser@master
Patch Set: Merge Created 5 years, 6 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 | « pubspec.yaml ('k') | 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 http_parser.http_date_test; 5 library http_parser.http_date_test;
6 6
7 import 'package:http_parser/http_parser.dart'; 7 import 'package:http_parser/http_parser.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:test/test.dart';
9 9
10 void main() { 10 void main() {
11 group('format', () { 11 group('format', () {
12 test('many values with 9', () { 12 test('many values with 9', () {
13 var date = new DateTime.utc(2014, 9, 9, 9, 9, 9); 13 var date = new DateTime.utc(2014, 9, 9, 9, 9, 9);
14 var formatted = formatHttpDate(date); 14 var formatted = formatHttpDate(date);
15 15
16 expect(formatted, 'Tue, 09 Sep 2014 09:09:09 GMT'); 16 expect(formatted, 'Tue, 09 Sep 2014 09:09:09 GMT');
17 var parsed = parseHttpDate(formatted); 17 var parsed = parseHttpDate(formatted);
18 18
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 throwsFormatException); 338 throwsFormatException);
339 }); 339 });
340 340
341 test("disallows trailing whitespace", () { 341 test("disallows trailing whitespace", () {
342 expect(() => parseHttpDate("Sun November 0 08:49:37 1994 "), 342 expect(() => parseHttpDate("Sun November 0 08:49:37 1994 "),
343 throwsFormatException); 343 throwsFormatException);
344 }); 344 });
345 }); 345 });
346 }); 346 });
347 } 347 }
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | test/media_type_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698