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

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

Issue 1637193003: Add suite information to the JSON reporter. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: fix changelog Created 4 years, 10 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
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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 "${(duration.inSeconds % 60).toString().padLeft(2, '0')}"; 373 "${(duration.inSeconds % 60).toString().padLeft(2, '0')}";
374 } 374 }
375 375
376 /// Returns a description of [liveTest]. 376 /// Returns a description of [liveTest].
377 /// 377 ///
378 /// This differs from the test's own description in that it may also include 378 /// This differs from the test's own description in that it may also include
379 /// the suite's name. 379 /// the suite's name.
380 String _description(LiveTest liveTest) { 380 String _description(LiveTest liveTest) {
381 var name = liveTest.test.name; 381 var name = liveTest.test.name;
382 382
383 if (_printPath && liveTest.suite.path != null) { 383 if (_printPath && liveTest.suite is! LoadSuite &&
384 liveTest.suite.path != null) {
384 name = "${liveTest.suite.path}: $name"; 385 name = "${liveTest.suite.path}: $name";
385 } 386 }
386 387
387 if (_printPlatform && liveTest.suite.platform != null) { 388 if (_printPlatform && liveTest.suite.platform != null) {
388 name = "[${liveTest.suite.platform.name}] $name"; 389 name = "[${liveTest.suite.platform.name}] $name";
389 } 390 }
390 391
391 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor"; 392 if (liveTest.suite is LoadSuite) name = "$_bold$_gray$name$_noColor";
392 393
393 return name; 394 return name;
394 } 395 }
395 } 396 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698