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

Unified Diff: pkg/testing/lib/src/run.dart

Issue 2693893002: Add a new kind of suite to ease test.dart integration. (Closed)
Patch Set: Fix Linux and Windows paths. Created 3 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 | « pkg/testing/lib/src/chain.dart ('k') | pkg/testing/lib/src/stdio_process.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/testing/lib/src/run.dart
diff --git a/pkg/testing/lib/src/run.dart b/pkg/testing/lib/src/run.dart
index d1d6d3ae653a2a8b3bede857f76b06debda4aa29..c6bf90271c2a795b245ff840b024043cd5f94e84 100644
--- a/pkg/testing/lib/src/run.dart
+++ b/pkg/testing/lib/src/run.dart
@@ -49,6 +49,9 @@ import 'suite.dart' show
Dart,
Suite;
+import 'test_dart.dart' show
+ TestDart;
+
import 'zone_helper.dart' show
acknowledgeControlMessages;
@@ -179,7 +182,16 @@ class SuiteRunner {
suite.writeClosureOn(chain);
}
- if (testUris.isEmpty) return null;
+ bool hasTestDartSuite = false;
+ for (TestDart suite in suites.where((Suite suite) => suite is TestDart)) {
+ if (!hasTestDartSuite) {
+ suite.writeFirstImportOn(imports);
+ }
+ hasTestDartSuite = true;
+ suite.writeRunCommandOn(chain);
+ }
+
+ if (testUris.isEmpty && !hasTestDartSuite) return null;
return """
library testing.generated;
« no previous file with comments | « pkg/testing/lib/src/chain.dart ('k') | pkg/testing/lib/src/stdio_process.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698