| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library test_progress; | 5 library test_progress; |
| 6 | 6 |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import "dart:io"; | 8 import "dart:io"; |
| 9 import "dart:io" as io; | 9 import "dart:io" as io; |
| 10 import "dart:convert" show JSON; | 10 import "dart:convert" show JSON; |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 } | 303 } |
| 304 } | 304 } |
| 305 } | 305 } |
| 306 } | 306 } |
| 307 } | 307 } |
| 308 | 308 |
| 309 | 309 |
| 310 class SummaryPrinter extends EventListener { | 310 class SummaryPrinter extends EventListener { |
| 311 final bool jsonOnly; | 311 final bool jsonOnly; |
| 312 | 312 |
| 313 SummaryPrinter({this.jsonOnly}); | 313 SummaryPrinter({bool jsonOnly}) |
| 314 : jsonOnly = (jsonOnly == null) ? false : jsonOnly; |
| 314 | 315 |
| 315 void allTestsKnown() { | 316 void allTestsKnown() { |
| 316 if (jsonOnly) { | 317 if (jsonOnly) { |
| 317 print("JSON:"); | 318 print("JSON:"); |
| 318 print(JSON.encode(summaryReport.values)); | 319 print(JSON.encode(summaryReport.values)); |
| 319 } else { | 320 } else { |
| 320 summaryReport.printReport(); | 321 summaryReport.printReport(); |
| 321 } | 322 } |
| 322 } | 323 } |
| 323 } | 324 } |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 return new VerboseProgressIndicator(startTime); | 670 return new VerboseProgressIndicator(startTime); |
| 670 case 'status': | 671 case 'status': |
| 671 return new ProgressIndicator(startTime); | 672 return new ProgressIndicator(startTime); |
| 672 case 'buildbot': | 673 case 'buildbot': |
| 673 return new BuildbotProgressIndicator(startTime); | 674 return new BuildbotProgressIndicator(startTime); |
| 674 default: | 675 default: |
| 675 assert(false); | 676 assert(false); |
| 676 break; | 677 break; |
| 677 } | 678 } |
| 678 } | 679 } |
| OLD | NEW |