|
|
Improved the way we generate mismatch descriptions.
matches() methods can now return additional state that is used by describeMismatch(). This adds a small tax to the happy path, but makes the unhappy path quite a bit more efficient as well as providing better error messages.
Related to this, expect() can now be passed a verbose flag. Currently this is used by throwsA/returnsNormally to provide stack traces from the actual exception but could be used for other things too.
The tests for the Mock classes have been changed to be normal tests, not 'meta' tests.
A couple of other minor fixes.
Committed: https://code.google.com/p/dart/source/detail?r=10078
Total comments: 15
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+313 lines, -774 lines) |
Patch |
 |
M |
lib/unittest/collection_matchers.dart
|
View
|
1
2
3
|
5 chunks |
+44 lines, -11 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/core_matchers.dart
|
View
|
1
2
3
|
24 chunks |
+72 lines, -41 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/expect.dart
|
View
|
1
2
3
4
|
5 chunks |
+19 lines, -8 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/future_matchers.dart
|
View
|
1
2
3
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/interfaces.dart
|
View
|
1
2
3
|
3 chunks |
+28 lines, -9 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/map_matchers.dart
|
View
|
1
2
3
|
2 chunks |
+8 lines, -5 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/matcher.dart
|
View
|
1
2
3
|
2 chunks |
+24 lines, -4 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/mock.dart
|
View
|
1
2
3
|
16 chunks |
+54 lines, -32 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/numeric_matchers.dart
|
View
|
1
2
3
|
5 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/operator_matchers.dart
|
View
|
1
2
3
|
3 chunks |
+16 lines, -13 lines |
0 comments
|
Download
|
 |
M |
lib/unittest/string_matchers.dart
|
View
|
1
2
3
|
7 chunks |
+18 lines, -10 lines |
0 comments
|
Download
|
 |
M |
tests/lib/unittest/instance_test.dart
|
View
|
1
2
3
|
2 chunks |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
tests/lib/unittest/matchers_test.dart
|
View
|
1
2
3
|
11 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
 |
M |
tests/lib/unittest/unittest_test.dart
|
View
|
1
2
3
4
5
|
4 chunks |
+2 lines, -616 lines |
0 comments
|
Download
|
 |
M |
utils/tests/pub/version_test.dart
|
View
|
1
2
3
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
Total messages: 4 (0 generated)
|