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

Unified Diff: test/io.dart

Issue 934413002: Replace the existing unittest APIs with the new runner infrastructure. (Closed) Base URL: git@github.com:dart-lang/unittest@master
Patch Set: Rebase Created 5 years, 10 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: test/io.dart
diff --git a/test/io.dart b/test/io.dart
index 1dbc377eebf599728281be8e342a6657c3354061..b1632347bd9fb3f36d389a880abde1d0b8f9b842 100644
--- a/test/io.dart
+++ b/test/io.dart
@@ -18,10 +18,18 @@ String _computePackageDir() {
/// Runs the unittest executable with the package root set properly.
ProcessResult runUnittest(List<String> args, {String workingDirectory}) {
- var allArgs = Platform.executableArguments.toList()
- ..add(p.join(packageDir, 'bin/unittest.dart'))
- ..add("--package-root=${p.join(packageDir, 'packages')}")
- ..addAll(args);
+ var allArgs = [
+ p.join(packageDir, 'bin/unittest.dart'),
+ "--package-root=${p.join(packageDir, 'packages')}"
+ ]..addAll(args);
+
+ // TODO(nweiz): Use ScheduledProcess once it's compatible.
+ return runDart(allArgs, workingDirectory: workingDirectory);
+}
+
+/// Runs Dart.
+ProcessResult runDart(List<String> args, {String workingDirectory}) {
+ var allArgs = Platform.executableArguments.toList()..addAll(args);
// TODO(nweiz): Use ScheduledProcess once it's compatible.
return Process.runSync(Platform.executable, allArgs,

Powered by Google App Engine
This is Rietveld 408576698