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

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

Issue 1521693002: Roll Observatory deps (charted -> ^0.3.0) (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/observatory_pub_packages.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « packages/dart_style/test/splitting/mixed.stmt ('k') | packages/dart_style/test/whitespace/._blocks.stmt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/dart_style/test/utils.dart
diff --git a/packages/dart_style/test/utils.dart b/packages/dart_style/test/utils.dart
index 2c555d033826334885ba3ea667d1626299e69468..a2bacc539e81cdfc8498398434b21d611515e418 100644
--- a/packages/dart_style/test/utils.dart
+++ b/packages/dart_style/test/utils.dart
@@ -5,6 +5,7 @@
library dart_style.test.utils;
import 'dart:io';
+import 'dart:mirrors';
import 'package:path/path.dart' as p;
import 'package:scheduled_test/descriptor.dart' as d;
@@ -18,7 +19,12 @@ const formattedSource = 'void main() => print("hello");\n';
ScheduledProcess runFormatter([List<String> args]) {
if (args == null) args = [];
- var formatterPath = p.join("bin", "format.dart");
+ // 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 formatterPath = p.normalize(p.join(testDir, "../bin/format.dart"));
args.insert(0, formatterPath);
« no previous file with comments | « packages/dart_style/test/splitting/mixed.stmt ('k') | packages/dart_style/test/whitespace/._blocks.stmt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698