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

Unified Diff: packages/dart_style/test/utils.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: packages/dart_style/test/utils.dart
diff --git a/packages/dart_style/test/utils.dart b/packages/dart_style/test/utils.dart
index a2bacc539e81cdfc8498398434b21d611515e418..2ebf4061f3244401b9e2c9a9673f150ad4215bcf 100644
--- a/packages/dart_style/test/utils.dart
+++ b/packages/dart_style/test/utils.dart
@@ -21,16 +21,21 @@ ScheduledProcess runFormatter([List<String> args]) {
// Locate the "test" directory. Use mirrors so that this works with the test
// package, which loads this suite into an isolate.
- var testDir = p.dirname(
- currentMirrorSystem().findLibrary(#dart_style.test.utils).uri.path);
+ var testDir = p.dirname(currentMirrorSystem()
+ .findLibrary(#dart_style.test.utils)
+ .uri
+ .toFilePath());
var formatterPath = p.normalize(p.join(testDir, "../bin/format.dart"));
args.insert(0, formatterPath);
// Use the same package root, if there is one.
- if (Platform.packageRoot.isNotEmpty) {
+ if (Platform.packageRoot != null && Platform.packageRoot.isNotEmpty) {
args.insert(0, "--package-root=${Platform.packageRoot}");
+ } else if (Platform.packageConfig != null &&
+ Platform.packageConfig.isNotEmpty) {
+ args.insert(0, "--packages=${Platform.packageConfig}");
}
return new ScheduledProcess.start(Platform.executable, args);
« no previous file with comments | « packages/dart_style/test/splitting/variables.stmt ('k') | packages/dart_style/test/whitespace/._blocks.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698