OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #source("../../../../runtime/bin/http_utils.dart"); | 5 #source("../../../runtime/bin/http_utils.dart"); |
6 | 6 |
7 class HttpException implements Exception { | 7 class HttpException implements Exception { |
8 const HttpException([String this.message = ""]); | 8 const HttpException([String this.message = ""]); |
9 String toString() => "HttpException: $message"; | 9 String toString() => "HttpException: $message"; |
10 final String message; | 10 final String message; |
11 } | 11 } |
12 | 12 |
13 void testParseHttpDate() { | 13 void testParseHttpDate() { |
14 TimeZone utc = new TimeZone.utc(); | 14 TimeZone utc = new TimeZone.utc(); |
15 Date date; | 15 Date date; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 Expect.throws(() { | 82 Expect.throws(() { |
83 _HttpUtils.parseDate("$valid "); | 83 _HttpUtils.parseDate("$valid "); |
84 }); | 84 }); |
85 } | 85 } |
86 | 86 |
87 void main() { | 87 void main() { |
88 testParseHttpDate(); | 88 testParseHttpDate(); |
89 testFormatParseHttpDate(); | 89 testFormatParseHttpDate(); |
90 testParseHttpDateFailures(); | 90 testParseHttpDateFailures(); |
91 } | 91 } |
OLD | NEW |