| 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));
|
| + });
|
| }
|
|
|