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

Side by Side Diff: tests/isolate/spawn_uri_fail_test.dart

Issue 1553233002: Add package config support to dart:isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Addressed review comments. Created 4 years, 11 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
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "dart:io";
6 import "dart:isolate";
7 import "package:expect/expect.dart";
8
9 main() async {
10 var pkgRoot = Uri.parse("file:///no/such/directory/");
11 var pkgConfig = Uri.parse("file:///no/such/.packages");
12 try {
13 var i = await Isolate.spawnUri(Platform.script, [], null,
14 packageRoot: pkgRoot, packageConfig: pkgConfig);
15 } catch (e) {
16 print(e);
17 Expect.isTrue(e is ArgumentError);
18 }
19 try {
20 var i = await Isolate.spawnUri(Platform.script, [], null,
21 packageRoot: pkgRoot, automaticPackageResolution: true);
22 } catch (e) {
23 print(e);
24 Expect.isTrue(e is ArgumentError);
25 }
26 try {
27 var i = await Isolate.spawnUri(Platform.script, [], null,
28 packageConfig: pkgConfig, automaticPackageResolution: true);
29 } catch (e) {
30 print(e);
31 Expect.isTrue(e is ArgumentError);
32 }
33 try {
34 var i = await Isolate.spawnUri(Platform.script, [], null,
35 packageRoot: pkgRoot, packageConfig: pkgConfig,
36 automaticPackageResolution: true);
37 } catch (e) {
38 print(e);
39 Expect.isTrue(e is ArgumentError);
40 }
41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698