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

Issue 14600029: Add pretty-printing to unittest and more thoroughly print values. (Closed)

Created:
7 years, 7 months ago by nweiz
Modified:
7 years, 7 months ago
Reviewers:
gram
CC:
reviews_dartlang.org
Visibility:
Public.

Description

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

Patch Set 1 #

Total comments: 15

Patch Set 2 : Code review changes. #

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

Messages

Total messages: 6 (0 generated)
nweiz
7 years, 7 months ago (2013-05-16 23:40:10 UTC) #1
gram
https://codereview.chromium.org/14600029/diff/1/pkg/unittest/lib/src/core_matchers.dart File pkg/unittest/lib/src/core_matchers.dart (left): https://codereview.chromium.org/14600029/diff/1/pkg/unittest/lib/src/core_matchers.dart#oldcode178 pkg/unittest/lib/src/core_matchers.dart:178: var includeTypes = eType != aType; What was the ...
7 years, 7 months ago (2013-05-17 01:00:30 UTC) #2
nweiz
https://codereview.chromium.org/14600029/diff/1/pkg/unittest/lib/src/core_matchers.dart File pkg/unittest/lib/src/core_matchers.dart (left): https://codereview.chromium.org/14600029/diff/1/pkg/unittest/lib/src/core_matchers.dart#oldcode178 pkg/unittest/lib/src/core_matchers.dart:178: var includeTypes = eType != aType; On 2013/05/17 01:00:30, ...
7 years, 7 months ago (2013-05-17 19:50:56 UTC) #3
gram
lgtm with one nit about 'Unknown" types. https://codereview.chromium.org/14600029/diff/1/pkg/unittest/lib/src/core_matchers.dart File pkg/unittest/lib/src/core_matchers.dart (left): https://codereview.chromium.org/14600029/diff/1/pkg/unittest/lib/src/core_matchers.dart#oldcode178 pkg/unittest/lib/src/core_matchers.dart:178: var includeTypes ...
7 years, 7 months ago (2013-05-17 20:38:32 UTC) #4
nweiz
https://codereview.chromium.org/14600029/diff/1/pkg/unittest/test/matchers_test.dart File pkg/unittest/test/matchers_test.dart (right): https://codereview.chromium.org/14600029/diff/1/pkg/unittest/test/matchers_test.dart#newcode653 pkg/unittest/test/matchers_test.dart:653: }); On 2013/05/17 20:38:32, gram wrote: > I agree ...
7 years, 7 months ago (2013-05-17 21:07:21 UTC) #5
nweiz
7 years, 7 months ago (2013-05-17 21:10:24 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r22873 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698