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

Side by Side Diff: lib/src/runner/plugin/platform_helpers.dart

Issue 2066113002: Add location information to the JSON reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: cr Created 4 years, 6 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/engine.dart ('k') | lib/src/runner/remote_listener.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 6
7 import 'package:stack_trace/stack_trace.dart'; 7 import 'package:stack_trace/stack_trace.dart';
8 import 'package:stream_channel/stream_channel.dart'; 8 import 'package:stream_channel/stream_channel.dart';
9 9
10 import '../../backend/group.dart'; 10 import '../../backend/group.dart';
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 /// Deserializes [group] into a concrete [Group]. 113 /// Deserializes [group] into a concrete [Group].
114 Group deserializeGroup(Map group) { 114 Group deserializeGroup(Map group) {
115 var metadata = new Metadata.deserialize(group['metadata']); 115 var metadata = new Metadata.deserialize(group['metadata']);
116 return new Group(group['name'], (group['entries'] as List).map((entry) { 116 return new Group(group['name'], (group['entries'] as List).map((entry) {
117 var map = entry as Map; 117 var map = entry as Map;
118 if (map['type'] == 'group') return deserializeGroup(map); 118 if (map['type'] == 'group') return deserializeGroup(map);
119 return _deserializeTest(map); 119 return _deserializeTest(map);
120 }), 120 }),
121 metadata: metadata, 121 metadata: metadata,
122 trace: group['trace'] == null ? null : new Trace.parse(group['trace']),
122 setUpAll: _deserializeTest(group['setUpAll']), 123 setUpAll: _deserializeTest(group['setUpAll']),
123 tearDownAll: _deserializeTest(group['tearDownAll'])); 124 tearDownAll: _deserializeTest(group['tearDownAll']));
124 } 125 }
125 126
126 /// Deserializes [test] into a concrete [Test] class. 127 /// Deserializes [test] into a concrete [Test] class.
127 /// 128 ///
128 /// Returns `null` if [test] is `null`. 129 /// Returns `null` if [test] is `null`.
129 Test _deserializeTest(Map test) { 130 Test _deserializeTest(Map test) {
130 if (test == null) return null; 131 if (test == null) return null;
131 132
132 var metadata = new Metadata.deserialize(test['metadata']); 133 var metadata = new Metadata.deserialize(test['metadata']);
134 var trace = test['trace'] == null ? null : new Trace.parse(test['trace']);
133 var testChannel = _channel.virtualChannel(test['channel']); 135 var testChannel = _channel.virtualChannel(test['channel']);
134 return new RunnerTest(test['name'], metadata, testChannel, _mapTrace); 136 return new RunnerTest(
137 test['name'], metadata, trace, testChannel, _mapTrace);
135 } 138 }
136 } 139 }
OLDNEW
« no previous file with comments | « lib/src/runner/engine.dart ('k') | lib/src/runner/remote_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698