| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 import 'dart:io'; | 5 import 'dart:io'; |
| 6 | 6 |
| 7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
| 8 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
| 9 | 9 |
| 10 void testFromUri() { | 10 void testFromUri() { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 link.deleteSync(); | 27 link.deleteSync(); |
| 28 target.deleteSync(); | 28 target.deleteSync(); |
| 29 temp.deleteSync(); | 29 temp.deleteSync(); |
| 30 asyncEnd(); | 30 asyncEnd(); |
| 31 }); | 31 }); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void testFromUriUnsupported() { | 34 void testFromUriUnsupported() { |
| 35 Expect.throws( | 35 Expect.throws( |
| 36 () => new Link.fromUri(Uri.parse('http://localhost:8080/index.html')), | 36 () => new Link.fromUri(Uri.parse('http://localhost:8080/index.html')), |
| 37 (e) => e is UnsupportedOperation); | 37 (e) => e is UnsupportedError); |
| 38 Expect.throws(() => new Link.fromUri(Uri.parse('ftp://localhost/tmp/xxx')), | 38 Expect.throws(() => new Link.fromUri(Uri.parse('ftp://localhost/tmp/xxx')), |
| 39 (e) => e is UnsupportedOperation); | 39 (e) => e is UnsupportedError); |
| 40 Expect.throws(() => new Link.fromUri(Uri.parse('name#fragment')), | 40 Expect.throws(() => new Link.fromUri(Uri.parse('name#fragment')), |
| 41 (e) => e is UnsupportedOperation); | 41 (e) => e is UnsupportedError); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void main() { | 44 void main() { |
| 45 testFromUri(); | 45 testFromUri(); |
| 46 testFromUriUnsupported(); | 46 testFromUriUnsupported(); |
| 47 } | 47 } |
| OLD | NEW |