Index: tests/standalone/io/platform_test.dart |
diff --git a/tests/standalone/io/platform_test.dart b/tests/standalone/io/platform_test.dart |
index 308d5d013c01df9f3f2ce91a8014d4ebfcd65868..dd8defda58db0d6b4329a5af6e64be0af442cea3 100644 |
--- a/tests/standalone/io/platform_test.dart |
+++ b/tests/standalone/io/platform_test.dart |
@@ -49,10 +49,11 @@ test() { |
// Restore dir. |
Directory.current = oldDir; |
var pkgRootString = Platform.packageRoot; |
- Directory packageRoot = new Directory.fromUri(Uri.parse(pkgRootString)); |
- Expect.isTrue(packageRoot.existsSync()); |
- Expect.isTrue(new Directory("${packageRoot.path}/expect").existsSync()); |
- Expect.isTrue(Platform.executableArguments.any( |
+ if (pkgRootString != null) { |
+ Directory packageRoot = new Directory.fromUri(Uri.parse(pkgRootString)); |
+ Expect.isTrue(packageRoot.existsSync()); |
+ Expect.isTrue(new Directory("${packageRoot.path}/expect").existsSync()); |
+ Expect.isTrue(Platform.executableArguments.any( |
(arg) { |
if (!arg.startsWith("--package-root=")) { |
return false; |
@@ -60,8 +61,8 @@ test() { |
// Cut out the '--package-root=' prefix. |
arg = arg.substring(15); |
return pkgRootString.contains(arg); |
- } |
- )); |
+ })); |
+ } |
} |
void f(reply) { |