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

Unified Diff: lib/src/runner.dart

Issue 1960503002: Fix all strong-mode errors and warnings. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: .analysis_options Created 4 years, 7 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 | « lib/src/frontend/timeout.dart ('k') | lib/src/runner/browser/browser_manager.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner.dart
diff --git a/lib/src/runner.dart b/lib/src/runner.dart
index f6a66d44380b6acb1fded72b4da28842d1c2a7c2..29f28b061873fac52054cf3ca0a76aeac3c5aea2 100644
--- a/lib/src/runner.dart
+++ b/lib/src/runner.dart
@@ -232,7 +232,7 @@ class Runner {
/// Only tests that match [_config.patterns] will be included in the
/// suites once they're loaded.
Stream<LoadSuite> _loadSuites() {
- return mergeStreams(_config.paths.map((path) {
+ return StreamGroup.merge(_config.paths.map((path) {
if (new Directory(path).existsSync()) return _loader.loadDir(path);
if (new File(path).existsSync()) return _loader.loadFile(path);
@@ -246,7 +246,8 @@ class Runner {
return _shardSuite(suite.filter((test) {
// Skip any tests that don't match all the given patterns.
- if (!_config.patterns.every(test.name.contains)) {
+ if (!_config.patterns
+ .every((pattern) => test.name.contains(pattern))) {
return false;
}
@@ -305,11 +306,11 @@ class Runner {
///
/// This returns a map from tag names to lists of entries that use those tags.
Map<String, List<GroupEntry>> _collectUnknownTags(Suite suite) {
- var unknownTags = {};
- var currentTags = new Set();
+ var unknownTags = <String, List<GroupEntry>>{};
+ var currentTags = new Set<String>();
collect(entry) {
- var newTags = new Set();
+ var newTags = new Set<String>();
for (var unknownTag in
entry.metadata.tags.difference(_config.knownTags)) {
if (currentTags.contains(unknownTag)) continue;
« no previous file with comments | « lib/src/frontend/timeout.dart ('k') | lib/src/runner/browser/browser_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698