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..8e07881cc50d4b4c2b5be509e6e127fbabd67a70 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,7 +62,11 @@ class Configuration { |
| * a test suite. |
| */ |
| void onTestResult(TestCase testCase) { |
| - _currentTestCase = null; |
| + assert(testCase != null); |
| + if(_currentTestCase != null) { |
|
Siggi Cherem (dart-lang)
2013/02/26 19:37:37
nit: since this is just for assertions and nothing
|
| + assert(_currentTestCase == testCase); |
| + _currentTestCase = null; |
| + } |
| } |
| /** |