Chromium Code Reviews| Index: pkg/unittest/expect.dart |
| =================================================================== |
| --- pkg/unittest/expect.dart (revision 14114) |
| +++ pkg/unittest/expect.dart (working copy) |
| @@ -4,12 +4,9 @@ |
| /** |
| * This is the main assertion function. It asserts that [actual] |
| - * matches the [matcher]. [matcher] is optional and defaults to isTrue, |
| - * so expect can be used with a single predicate argument. [reason] |
| - * is optional and is typically not supplied if a reasonable matcher is |
| - * explicitly provided, as a reason can be generated from the matcher. |
| - * If [reason] is included it is appended to the reason generated |
| - * by the matcher. |
| + * matches the [matcher]. [reason] is optional and is typically not |
| + * supplied, as a reason is generated from the matcher; if [reason] |
| + * is included it is appended to the reason generated by the matcher. |
| * |
| * [matcher] can be a value in which case it will be wrapped in an |
| * [equals] matcher. |
| @@ -33,9 +30,9 @@ |
| * [Hamcrest] http://code.google.com/p/hamcrest/ |
| * [dart-matchers] https://github.com/Ladicek/dart-matchers |
| */ |
| -void expect(actual, [matcher = isTrue, String reason = null, |
| - FailureHandler failureHandler = null, |
| - bool verbose = false]) { |
| +void expect(actual, matcher, { String reason : null, |
|
Siggi Cherem (dart-lang)
2012/10/26 00:44:51
nits:
- remove space between { and String
- remove
Jennifer Messerly
2012/10/26 02:57:05
also, remove "null" if you can. AFAIK, it's implie
gram
2012/10/26 22:26:27
Done.
gram
2012/10/26 22:26:27
Done.
|
| + FailureHandler failureHandler : null, |
| + bool verbose : false}) { |
| matcher = wrapMatcher(matcher); |
| bool doesMatch; |
| var matchState = new MatchState(); |