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

Side by Side Diff: lib/src/runner/reporter/compact.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/live_suite_controller.dart ('k') | lib/src/runner/reporter/expanded.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:io'; 6 import 'dart:io';
7 import 'dart:isolate'; 7 import 'dart:isolate';
8 8
9 import '../../backend/live_test.dart'; 9 import '../../backend/live_test.dart';
10 import '../../backend/state.dart'; 10 import '../../backend/state.dart';
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 _printedNewline = true; 205 _printedNewline = true;
206 206
207 print(line); 207 print(line);
208 })); 208 }));
209 } 209 }
210 210
211 /// A callback called when [liveTest]'s state becomes [state]. 211 /// A callback called when [liveTest]'s state becomes [state].
212 void _onStateChange(LiveTest liveTest, State state) { 212 void _onStateChange(LiveTest liveTest, State state) {
213 if (state.status != Status.complete) return; 213 if (state.status != Status.complete) return;
214 214
215 if (liveTest.test.metadata.skip && 215 if (state.result == Result.skipped &&
216 liveTest.test.metadata.skipReason != null) { 216 liveTest.test.metadata.skipReason != null) {
217 _progressLine(_description(liveTest)); 217 _progressLine(_description(liveTest));
218 print(''); 218 print('');
219 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}' 219 print(indent('${_yellow}Skip: ${liveTest.test.metadata.skipReason}'
220 '$_noColor')); 220 '$_noColor'));
221 } else { 221 } else {
222 // Always display the name of the oldest active test, unless testing 222 // Always display the name of the oldest active test, unless testing
223 // is finished in which case display the last test to complete. 223 // is finished in which case display the last test to complete.
224 if (_engine.active.isEmpty) { 224 if (_engine.active.isEmpty) {
225 _progressLine(_description(liveTest)); 225 _progressLine(_description(liveTest));
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 387
388 if (_printPlatform && liveTest.suite.platform != null) { 388 if (_printPlatform && liveTest.suite.platform != null) {
389 name = "[${liveTest.suite.platform.name}] $name"; 389 name = "[${liveTest.suite.platform.name}] $name";
390 } 390 }
391 391
392 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor"; 392 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor";
393 393
394 return name; 394 return name;
395 } 395 }
396 } 396 }
OLDNEW
« no previous file with comments | « lib/src/runner/live_suite_controller.dart ('k') | lib/src/runner/reporter/expanded.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698