Index: pkg/front_end/test/dependency_grapher_test.dart |
diff --git a/pkg/front_end/test/dependency_grapher_test.dart b/pkg/front_end/test/dependency_grapher_test.dart |
index bc1a4729722dbfd4187fc515e5982e7b99fbfc4a..d3fefa39eb2d040e635049e54142a59c28fa238c 100644 |
--- a/pkg/front_end/test/dependency_grapher_test.dart |
+++ b/pkg/front_end/test/dependency_grapher_test.dart |
@@ -31,11 +31,14 @@ class DependencyGrapherTest { |
} |
Future<List<LibraryCycleNode>> getCycles(Map<String, String> contents, |
- {List<String> startingPoints, String packagesFilePath = ''}) async { |
+ {List<String> startingPoints, String packagesFilePath}) async { |
// If no starting points given, assume the first entry in [contents] is the |
// single starting point. |
startingPoints ??= [contents.keys.first]; |
var fileSystem = new MemoryFileSystem(Uri.parse('file:///')); |
+ if (packagesFilePath == null) { |
+ fileSystem.entityForUri(Uri.parse('.packages')).writeAsStringSync(''); |
+ } |
contents.forEach((path, text) { |
fileSystem.entityForUri(pathos.posix.toUri(path)).writeAsStringSync(text); |
}); |
@@ -43,8 +46,8 @@ class DependencyGrapherTest { |
var options = new CompilerOptions() |
..fileSystem = fileSystem |
..chaseDependencies = true |
- ..packagesFileUri = packagesFilePath == '' |
- ? new Uri() |
+ ..packagesFileUri = packagesFilePath == null |
+ ? Uri.parse('.packages') |
: pathos.posix.toUri(packagesFilePath); |
var graph = await graphForProgram( |
startingPoints.map(pathos.posix.toUri).toList(), options); |