Chromium Code Reviews| 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; |
| } |