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

Side by Side Diff: lib/src/runner/reporter/expanded.dart

Issue 2099503002: Add a dedicated Result for skipped tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 5 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/reporter/compact.dart ('k') | lib/src/runner/reporter/json.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:isolate'; 6 import 'dart:isolate';
7 7
8 import '../../backend/live_test.dart'; 8 import '../../backend/live_test.dart';
9 import '../../backend/state.dart'; 9 import '../../backend/state.dart';
10 import '../../utils.dart'; 10 import '../../utils.dart';
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 _subscriptions.add(liveTest.onPrint.listen((line) { 187 _subscriptions.add(liveTest.onPrint.listen((line) {
188 _progressLine(_description(liveTest)); 188 _progressLine(_description(liveTest));
189 print(line); 189 print(line);
190 })); 190 }));
191 } 191 }
192 192
193 /// A callback called when [liveTest]'s state becomes [state]. 193 /// A callback called when [liveTest]'s state becomes [state].
194 void _onStateChange(LiveTest liveTest, State state) { 194 void _onStateChange(LiveTest liveTest, State state) {
195 if (state.status != Status.complete) return; 195 if (state.status != Status.complete) return;
196 196
197 if (liveTest.test.metadata.skip && 197 if (state.result == Result.skipped &&
198 liveTest.test.metadata.skipReason != null) { 198 liveTest.test.metadata.skipReason != null) {
199 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}' 199 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}'
200 '$_noColor')); 200 '$_noColor'));
201 } else if (_engine.active.isNotEmpty) { 201 } else if (_engine.active.isNotEmpty) {
202 // If any tests are running, display the name of the oldest active 202 // If any tests are running, display the name of the oldest active
203 // test. 203 // test.
204 _progressLine(_description(_engine.active.first)); 204 _progressLine(_description(_engine.active.first));
205 } 205 }
206 } 206 }
207 207
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 321
322 if (_printPlatform && liveTest.suite.platform != null) { 322 if (_printPlatform && liveTest.suite.platform != null) {
323 name = "[${liveTest.suite.platform.name}] $name"; 323 name = "[${liveTest.suite.platform.name}] $name";
324 } 324 }
325 325
326 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor"; 326 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor";
327 327
328 return name; 328 return name;
329 } 329 }
330 } 330 }
OLDNEW
« no previous file with comments | « lib/src/runner/reporter/compact.dart ('k') | lib/src/runner/reporter/json.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698