|
Add pretty-printing to unittest and more thoroughly print values.
This adds a prettyPrint function that knows to respect line lengths and avoid
printing too much of very large objects. Because that function has built-in
guards against over-printing, the default error formatter is changed to print
the actual value by default.
This also tweaks the output of some matchers to take advantage of the assumption
that the full actual value will always be printed.
R=gram@google.com
Committed: https://code.google.com/p/dart/source/detail?r=22873
Total comments: 15
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+569 lines, -222 lines) |
Patch |
 |
M |
pkg/unittest/lib/matcher.dart
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/lib/src/core_matchers.dart
|
View
|
|
3 chunks |
+2 lines, -26 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/lib/src/description.dart
|
View
|
|
2 chunks |
+2 lines, -33 lines |
0 comments
|
Download
|
 |
|
pkg/unittest/lib/src/expect.dart
|
View
|
1
|
1 chunk |
+9 lines, -22 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/lib/src/iterable_matchers.dart
|
View
|
1
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
pkg/unittest/lib/src/map_matchers.dart
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/lib/src/numeric_matchers.dart
|
View
|
|
1 chunk |
+1 line, -4 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/lib/src/operator_matchers.dart
|
View
|
1
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
A |
pkg/unittest/lib/src/pretty_print.dart
|
View
|
1
|
1 chunk |
+102 lines, -0 lines |
2 comments
|
Download
|
 |
A |
pkg/unittest/lib/src/utils.dart
|
View
|
1
|
1 chunk |
+48 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/test/instance_test.dart
|
View
|
1
|
1 chunk |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/test/matchers_test.dart
|
View
|
1
|
35 chunks |
+165 lines, -124 lines |
0 comments
|
Download
|
 |
A |
pkg/unittest/test/pretty_print_test.dart
|
View
|
1
|
1 chunk |
+221 lines, -0 lines |
0 comments
|
Download
|
 |
M |
pkg/unittest/test/unittest_test.dart
|
View
|
1
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
Total messages: 6 (0 generated)
|