OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
| 5 #import("dart:io"); |
| 6 |
5 class TimerCancelTest { | 7 class TimerCancelTest { |
6 | 8 |
7 static void testSimpleTimer() { | 9 static void testSimpleTimer() { |
8 | 10 |
9 void timeoutHandlerUnreachable(Timer timer) { | 11 void timeoutHandlerUnreachable(Timer timer) { |
10 Expect.equals(true, false); | 12 Expect.equals(true, false); |
11 } | 13 } |
12 | 14 |
13 void timeoutHandler(Timer timer) { | 15 void timeoutHandler(Timer timer) { |
14 cancelTimer.cancel(); | 16 cancelTimer.cancel(); |
(...skipping 17 matching lines...) Expand all Loading... |
32 testSimpleTimer(); | 34 testSimpleTimer(); |
33 } | 35 } |
34 | 36 |
35 static Timer cancelTimer; | 37 static Timer cancelTimer; |
36 static int repeatTimer; | 38 static int repeatTimer; |
37 } | 39 } |
38 | 40 |
39 main() { | 41 main() { |
40 TimerCancelTest.testMain(); | 42 TimerCancelTest.testMain(); |
41 } | 43 } |
OLD | NEW |