Chromium Code Reviews| Index: pkg/unittest/unittest.dart |
| diff --git a/pkg/unittest/unittest.dart b/pkg/unittest/unittest.dart |
| index 83f3c6481dc5ae5185e37ce3169b83bc7b971f4b..04d7b38145bbaed6fff962ecf1304b13b4201789 100644 |
| --- a/pkg/unittest/unittest.dart |
| +++ b/pkg/unittest/unittest.dart |
| @@ -319,6 +319,12 @@ class _SpreadArgsHelper { |
| _init(Function callback, Function shouldCallBack, Function isDone, |
| [expectedCalls = 0]) { |
| ensureInitialized(); |
| + if (!(_currentTest >= 0 && |
| + _currentTest < _tests.length && |
| + _tests[_currentTest] != null)) { |
| + print("No valid test, did you forget to run your test inside a call " |
|
Siggi Cherem (dart-lang)
2012/10/08 21:50:07
I'm surprised you need this... I'm cc'ing Graham f
gram
2012/10/08 22:03:30
We have an assert on the next line for the convers
justinfagnani
2012/10/08 22:12:48
I added an expectAsync to a test before wrapping i
justinfagnani
2012/10/08 22:12:48
The problem was that I wasn't getting the source o
Siggi Cherem (dart-lang)
2012/10/08 22:29:15
I see - I hope so. We can also turn the assert int
|
| + "to test()?"); |
| + } |
| assert(_currentTest >= 0 && |
| _currentTest < _tests.length && |
| _tests[_currentTest] != null); |