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

Side by Side Diff: lib/src/backend/metadata.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 unified diff | Download patch
« no previous file with comments | « lib/src/backend/live_test.dart ('k') | lib/src/executable.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:boolean_selector/boolean_selector.dart'; 7 import 'package:boolean_selector/boolean_selector.dart';
8 import 'package:collection/collection.dart'; 8 import 'package:collection/collection.dart';
9 9
10 import '../frontend/skip.dart'; 10 import '../frontend/skip.dart';
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 /// 51 ///
52 /// This is guaranteed not to have any keys that match [tags]; those are 52 /// This is guaranteed not to have any keys that match [tags]; those are
53 /// resolved when the metadata is constructed. 53 /// resolved when the metadata is constructed.
54 final Map<BooleanSelector, Metadata> forTag; 54 final Map<BooleanSelector, Metadata> forTag;
55 55
56 /// Parses a user-provided map into the value for [onPlatform]. 56 /// Parses a user-provided map into the value for [onPlatform].
57 static Map<PlatformSelector, Metadata> _parseOnPlatform( 57 static Map<PlatformSelector, Metadata> _parseOnPlatform(
58 Map<String, dynamic> onPlatform) { 58 Map<String, dynamic> onPlatform) {
59 if (onPlatform == null) return {}; 59 if (onPlatform == null) return {};
60 60
61 var result = {}; 61 var result = <PlatformSelector, Metadata>{};
62 onPlatform.forEach((platform, metadata) { 62 onPlatform.forEach((platform, metadata) {
63 if (metadata is Timeout || metadata is Skip) { 63 if (metadata is Timeout || metadata is Skip) {
64 metadata = [metadata]; 64 metadata = [metadata];
65 } else if (metadata is! List) { 65 } else if (metadata is! List) {
66 throw new ArgumentError('Metadata for platform "$platform" must be a ' 66 throw new ArgumentError('Metadata for platform "$platform" must be a '
67 'Timeout, Skip, or List of those; was "$metadata".'); 67 'Timeout, Skip, or List of those; was "$metadata".');
68 } 68 }
69 69
70 var selector = new PlatformSelector.parse(platform); 70 var selector = new PlatformSelector.parse(platform);
71 71
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 _serializeTimeout(Timeout timeout) { 316 _serializeTimeout(Timeout timeout) {
317 if (timeout == Timeout.none) return 'none'; 317 if (timeout == Timeout.none) return 'none';
318 return { 318 return {
319 'duration': timeout.duration == null 319 'duration': timeout.duration == null
320 ? null 320 ? null
321 : timeout.duration.inMicroseconds, 321 : timeout.duration.inMicroseconds,
322 'scaleFactor': timeout.scaleFactor 322 'scaleFactor': timeout.scaleFactor
323 }; 323 };
324 } 324 }
325 } 325 }
OLDNEW
« no previous file with comments | « lib/src/backend/live_test.dart ('k') | lib/src/executable.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698