| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import "dart:isolate"; | 6 import "dart:isolate"; |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 | 8 |
| 9 main() async { | 9 main() async { |
| 10 var pkgRoot = Uri.parse("file:///no/such/directory/"); | 10 var pkgRoot = Uri.parse("file:///no/such/directory/"); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 try { | 26 try { |
| 27 var i = await Isolate.spawnUri(Platform.script, [], null, | 27 var i = await Isolate.spawnUri(Platform.script, [], null, |
| 28 packageConfig: pkgConfig, automaticPackageResolution: true); | 28 packageConfig: pkgConfig, automaticPackageResolution: true); |
| 29 } catch (e) { | 29 } catch (e) { |
| 30 print(e); | 30 print(e); |
| 31 Expect.isTrue(e is ArgumentError); | 31 Expect.isTrue(e is ArgumentError); |
| 32 } | 32 } |
| 33 try { | 33 try { |
| 34 var i = await Isolate.spawnUri(Platform.script, [], null, | 34 var i = await Isolate.spawnUri(Platform.script, [], null, |
| 35 packageRoot: pkgRoot, packageConfig: pkgConfig, | 35 packageRoot: pkgRoot, |
| 36 packageConfig: pkgConfig, |
| 36 automaticPackageResolution: true); | 37 automaticPackageResolution: true); |
| 37 } catch (e) { | 38 } catch (e) { |
| 38 print(e); | 39 print(e); |
| 39 Expect.isTrue(e is ArgumentError); | 40 Expect.isTrue(e is ArgumentError); |
| 40 } | 41 } |
| 41 } | 42 } |
| OLD | NEW |