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

Unified Diff: pkg/unittest/unittest.dart

Issue 11028076: Fix timer tests: timer tests were not using expectAsync to wait for (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | tests/isolate/multiple_timer_test.dart » ('j') | tests/isolate/timer_cancel1_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | tests/isolate/multiple_timer_test.dart » ('j') | tests/isolate/timer_cancel1_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698