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

Unified Diff: pkg/unittest/lib/compact_vm_config.dart

Issue 12316106: Add comment in unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ede701025cf8f8bff110684ce84a0610d211f9ed..ae8ec971b17d0378c7f9922fbc7c3d964af3682a 100644
--- a/pkg/unittest/lib/compact_vm_config.dart
+++ b/pkg/unittest/lib/compact_vm_config.dart
@@ -101,6 +101,9 @@ class CompactVMConfiguration extends VMConfiguration {
buffer.write(': ');
buffer.write(color);
+ // Ensure the line fits under MAX_LINE. [buffer] includes the color escape
+ // sequences too. Because these sequences are not visible characters, we
+ // make sure they are not counted towards the limit.
int nonVisible = _nonVisiblePrefix + color.length +
(failed != 0 ? (_RED.length + _NONE.length) : 0);
int len = buffer.length - nonVisible;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698