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 // Dart test program for testing file I/O. | 5 // Dart test program for testing file I/O. |
6 | 6 |
| 7 #import("dart:io"); |
7 | 8 |
8 class FileTest { | 9 class FileTest { |
9 static Directory tempDirectory; | 10 static Directory tempDirectory; |
10 static int numLiveAsyncTests = 0; | 11 static int numLiveAsyncTests = 0; |
11 | 12 |
12 static void asyncTestStarted() { ++numLiveAsyncTests; } | 13 static void asyncTestStarted() { ++numLiveAsyncTests; } |
13 static void asyncTestDone() { | 14 static void asyncTestDone() { |
14 --numLiveAsyncTests; | 15 --numLiveAsyncTests; |
15 if (numLiveAsyncTests == 0) { | 16 if (numLiveAsyncTests == 0) { |
16 deleteTempDirectory(); | 17 deleteTempDirectory(); |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
767 testAppend(); | 768 testAppend(); |
768 testAppendSync(); | 769 testAppendSync(); |
769 asyncTestDone(); | 770 asyncTestDone(); |
770 }); | 771 }); |
771 } | 772 } |
772 } | 773 } |
773 | 774 |
774 main() { | 775 main() { |
775 FileTest.testMain(); | 776 FileTest.testMain(); |
776 } | 777 } |
OLD | NEW |