Chromium Code Reviews| Index: pkg/unittest/lib/compact_vm_config.dart |
| diff --git a/pkg/unittest/lib/compact_vm_config.dart b/pkg/unittest/lib/compact_vm_config.dart |
| index c0f85b0a87594cff2937a03f9e4a6855b030a429..60e023c1d5498a46b99bf6f3ad29c0e61f8e2033 100644 |
| --- a/pkg/unittest/lib/compact_vm_config.dart |
| +++ b/pkg/unittest/lib/compact_vm_config.dart |
| @@ -56,13 +56,13 @@ class CompactVMConfiguration extends VMConfiguration { |
| } else { |
| _fail++; |
| _progressLine(_start, _pass, _fail, test.description); |
| - stdout.write('\n'); |
| + _print(); |
| if (test.message != '') { |
| - print(indent(test.message)); |
| + _print(indent(test.message)); |
| } |
| if (test.stackTrace != null) { |
| - print(indent(test.stackTrace.toString())); |
| + _print(indent(test.stackTrace.toString())); |
| } |
| } |
| } |
| @@ -71,13 +71,13 @@ class CompactVMConfiguration extends VMConfiguration { |
| _pass--; |
| _fail++; |
| _progressLine(_start, _pass, _fail, test.description); |
| - stdout.write('\n'); |
| + _print(); |
| if (test.message != '') { |
| - print(indent(test.message)); |
| + _print(indent(test.message)); |
| } |
| if (test.stackTrace != null) { |
| - print(indent(test.stackTrace.toString())); |
| + _print(indent(test.stackTrace.toString())); |
| } |
| } |
| @@ -94,18 +94,18 @@ class CompactVMConfiguration extends VMConfiguration { |
| String uncaughtError) { |
| var success = false; |
| if (passed == 0 && failed == 0 && errors == 0 && uncaughtError == null) { |
| - print('\nNo tests ran.'); |
| + _print('\nNo tests ran.'); |
| } else if (failed == 0 && errors == 0 && uncaughtError == null) { |
| _progressLine(_start, _pass, _fail, 'All tests passed!', _NONE); |
| - stdout.write('\n'); |
| + _print(); |
| success = true; |
| } else { |
| _progressLine(_start, _pass, _fail, 'Some tests failed.', _RED); |
| - stdout.write('\n'); |
| + _print(); |
| if (uncaughtError != null) { |
| - print('Top-level uncaught error: $uncaughtError'); |
| + _print('Top-level uncaught error: $uncaughtError'); |
| } |
| - print('$passed PASSED, $failed FAILED, $errors ERRORS'); |
| + _print('$passed PASSED, $failed FAILED, $errors ERRORS'); |
| } |
| } |
| @@ -201,6 +201,8 @@ class CompactVMConfiguration extends VMConfiguration { |
| } |
| } |
| +_print([value = '']) => stdout.write('$value\n'); |
|
Bob Nystrom
2014/03/05 01:36:08
Add a TODO to remove this when/if the underlying b
Siggi Cherem (dart-lang)
2014/03/05 01:39:20
Done.
|
| + |
| void useCompactVMConfiguration() { |
| // If the test is running on the Dart buildbots, we don't want to use this |
| // config since it's output may not be what the bots expect. |