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

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

Issue 12340082: pkg/unittest: fixed asserts around currentTestCase (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: addressed Siggi's nit 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/config.dart
diff --git a/pkg/unittest/lib/src/config.dart b/pkg/unittest/lib/src/config.dart
index cbedfb3d7cba3430b87fbd63de62794b089c60e0..01b97a381492582bbd06f6013d8104b79d968427 100644
--- a/pkg/unittest/lib/src/config.dart
+++ b/pkg/unittest/lib/src/config.dart
@@ -52,6 +52,8 @@ class Configuration {
* a test suite.
*/
void onTestStart(TestCase testCase) {
+ assert(testCase != null);
+ assert(_currentTestCase == null);
_currentTestCase = testCase;
}
@@ -60,6 +62,8 @@ class Configuration {
* a test suite.
*/
void onTestResult(TestCase testCase) {
+ assert(testCase != null);
+ assert(_currentTestCase == null || _currentTestCase == testCase);
gram 2013/02/26 21:42:13 This is just begging for an XOR logical operator,
_currentTestCase = null;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698