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

Unified Diff: tests/isolate/timer_cancel2_test.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
Index: tests/isolate/timer_cancel2_test.dart
diff --git a/tests/isolate/timer_cancel2_test.dart b/tests/isolate/timer_cancel2_test.dart
index 9e9f93dc1eb045ffd8a301c0b6e63bbe8c0f40f5..025638c2e54888c320eb631de9ee7c1e1755e703 100644
--- a/tests/isolate/timer_cancel2_test.dart
+++ b/tests/isolate/timer_cancel2_test.dart
@@ -5,24 +5,17 @@
#library('timer_cancel2_test');
#import("dart:isolate");
+#import('../../pkg/unittest/unittest.dart');
-// Test that a timeout handler can cancel itself.
-class TimerCancel2Test {
- static void testSelfCancel() {
+main() {
+ // Test that a timeout handler can cancel itself.
+ test("timer cancel test 2", () {
var cancelTimer;
void cancelHandler(Timer timer) {
cancelTimer.cancel();
}
- cancelTimer = new Timer.repeating(1, cancelHandler);
- }
-
- static void testMain() {
- testSelfCancel();
- }
-}
-
-main() {
- TimerCancel2Test.testMain();
+ cancelTimer = new Timer.repeating(1, expectAsync1(cancelHandler));
+ });
}

Powered by Google App Engine
This is Rietveld 408576698