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

Unified Diff: lib/src/runner/configuration/args.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/runner/configuration.dart ('k') | lib/src/runner/configuration/load.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/configuration/args.dart
diff --git a/lib/src/runner/configuration/args.dart b/lib/src/runner/configuration/args.dart
index 3f6b66f48d1e51bcab2809ca7cfc7272af5dcdfa..48ac46f8f492286be33bd3d8100a3e7440e39891 100644
--- a/lib/src/runner/configuration/args.dart
+++ b/lib/src/runner/configuration/args.dart
@@ -131,10 +131,11 @@ class _Parser {
/// Returns the parsed configuration.
Configuration parse() {
- var patterns = _options['name']
- .map((value) => _wrapFormatException('name', () => new RegExp(value)))
+ var patterns = (_options['name'] as List<String>)
+ .map/*<Pattern>*/(
+ (value) => _wrapFormatException('name', () => new RegExp(value)))
.toList()
- ..addAll(_options['plain-name']);
+ ..addAll(_options['plain-name'] as List<String>);
var includeTagSet = new Set.from(_options['tags'] ?? [])
..addAll(_options['tag'] ?? []);
@@ -181,8 +182,9 @@ class _Parser {
totalShards: totalShards,
timeout: _parseOption('timeout', (value) => new Timeout.parse(value)),
patterns: patterns,
- platforms: _ifParsed('platform')?.map(TestPlatform.find),
- chosenPresets: _ifParsed('preset'),
+ platforms: (_ifParsed('platform') as List<String>)
+ ?.map(TestPlatform.find),
+ chosenPresets: _ifParsed('preset') as List<String>,
paths: _options.rest.isEmpty ? null : _options.rest,
includeTags: includeTags,
excludeTags: excludeTags);
@@ -197,18 +199,18 @@ class _Parser {
/// Runs [parse] on the value of the option [name], and wraps any
/// [FormatException] it throws with additional information.
- _parseOption(String name, parse(value)) {
+ /*=T*/ _parseOption/*<T>*/(String name, /*=T*/ parse(String value)) {
if (!_options.wasParsed(name)) return null;
var value = _options[name];
if (value == null) return null;
- return _wrapFormatException(name, () => parse(value));
+ return _wrapFormatException(name, () => parse(value as String));
}
/// Runs [parse], and wraps any [FormatException] it throws with additional
/// information.
- _wrapFormatException(String name, parse()) {
+ /*=T*/ _wrapFormatException/*<T>*/(String name, /*=T*/ parse()) {
try {
return parse();
} on FormatException catch (error) {
« no previous file with comments | « lib/src/runner/configuration.dart ('k') | lib/src/runner/configuration/load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698