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

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: Code review changes 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
« no previous file with comments | « test/invalid_ops_test.dart ('k') | test/late_exception_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/io.dart
diff --git a/test/io.dart b/test/io.dart
index fc5456213bac20de5019a4024317ecdfe62875e9..09bd31df2c4de4a59f98d13dbd3b560aded397e4 100644
--- a/test/io.dart
+++ b/test/io.dart
@@ -17,10 +17,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,
« no previous file with comments | « test/invalid_ops_test.dart ('k') | test/late_exception_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698