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

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

Issue 12366004: When we have excess callbacks, throw instead of calling error() so that we (Closed) Base URL: http://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 | pkg/unittest/test/unittest_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/unittest.dart
===================================================================
--- pkg/unittest/lib/unittest.dart (revision 19168)
+++ pkg/unittest/lib/unittest.dart (working copy)
@@ -432,11 +432,11 @@
_after, _testNum);
}
- /** Returns false if we exceded the number of expected calls. */
+ /** Returns true if we have not exceeded the number of expected calls. */
bool _checkCallCount() {
if (_actualCalls > _expectedCalls) {
- _testCase.error('Callback ${_id}called more times than expected '
- '($_actualCalls > $_expectedCalls).', '');
+ throw new TestFailure('Callback ${_id}called more times than expected '
+ '($_actualCalls > $_expectedCalls).');
return false;
Jennifer Messerly 2013/02/27 22:42:55 remove?
}
return true;
« no previous file with comments | « no previous file | pkg/unittest/test/unittest_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698