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

Side by Side Diff: lib/src/runner/reporter/json.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/runner/plugin/platform_helpers.dart ('k') | lib/src/util/forkable_stream.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:async'; 5 import 'dart:async';
6 import 'dart:convert'; 6 import 'dart:convert';
7 7
8 import '../../backend/group.dart'; 8 import '../../backend/group.dart';
9 import '../../backend/live_test.dart'; 9 import '../../backend/live_test.dart';
10 import '../../backend/metadata.dart'; 10 import '../../backend/metadata.dart';
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 }); 177 });
178 return id; 178 return id;
179 } 179 }
180 180
181 /// Returns a list of the IDs for all the groups in [groups], which are 181 /// Returns a list of the IDs for all the groups in [groups], which are
182 /// contained in the suite identified by [suiteID]. 182 /// contained in the suite identified by [suiteID].
183 /// 183 ///
184 /// If a group doesn't have an ID yet, this assigns one and emits a new event 184 /// If a group doesn't have an ID yet, this assigns one and emits a new event
185 /// for that group. 185 /// for that group.
186 List<int> _idsForGroups(Iterable<Group> groups, int suiteID) { 186 List<int> _idsForGroups(Iterable<Group> groups, int suiteID) {
187 var parentID; 187 int parentID;
188 return groups.map((group) { 188 return groups.map((group) {
189 if (_groupIDs.containsKey(group)) { 189 if (_groupIDs.containsKey(group)) {
190 parentID = _groupIDs[group]; 190 parentID = _groupIDs[group];
191 return parentID; 191 return parentID;
192 } 192 }
193 193
194 var id = _nextID++; 194 var id = _nextID++;
195 _groupIDs[group] = id; 195 _groupIDs[group] = id;
196 196
197 _emit("group", { 197 _emit("group", {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 _emit("done", {"success": success}); 243 _emit("done", {"success": success});
244 } 244 }
245 245
246 /// Emits an event with the given type and attributes. 246 /// Emits an event with the given type and attributes.
247 void _emit(String type, Map attributes) { 247 void _emit(String type, Map attributes) {
248 attributes["type"] = type; 248 attributes["type"] = type;
249 attributes["time"] = _stopwatch.elapsed.inMilliseconds; 249 attributes["time"] = _stopwatch.elapsed.inMilliseconds;
250 print(JSON.encode(attributes)); 250 print(JSON.encode(attributes));
251 } 251 }
252 } 252 }
OLDNEW
« no previous file with comments | « lib/src/runner/plugin/platform_helpers.dart ('k') | lib/src/util/forkable_stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698