OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #import("dart:io"); |
8 #import("dart:isolate"); | 8 #import("dart:isolate"); |
9 | 9 |
10 class MyListOfOneElement implements List { | 10 class MyListOfOneElement implements List { |
11 int _value; | 11 int _value; |
12 MyListOfOneElement(this._value); | 12 MyListOfOneElement(this._value); |
13 int get length() => 1; | 13 int get length => 1; |
14 operator [](int index) => _value; | 14 operator [](int index) => _value; |
15 } | 15 } |
16 | 16 |
17 class FileTest { | 17 class FileTest { |
18 static Directory tempDirectory; | 18 static Directory tempDirectory; |
19 static int numLiveAsyncTests = 0; | 19 static int numLiveAsyncTests = 0; |
20 static ReceivePort port; | 20 static ReceivePort port; |
21 | 21 |
22 static void asyncTestStarted() { ++numLiveAsyncTests; } | 22 static void asyncTestStarted() { ++numLiveAsyncTests; } |
23 static void asyncTestDone(String name) { | 23 static void asyncTestDone(String name) { |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 testWriteVariousLists(); | 1273 testWriteVariousLists(); |
1274 testDirectory(); | 1274 testDirectory(); |
1275 testDirectorySync(); | 1275 testDirectorySync(); |
1276 }); | 1276 }); |
1277 } | 1277 } |
1278 } | 1278 } |
1279 | 1279 |
1280 main() { | 1280 main() { |
1281 FileTest.testMain(); | 1281 FileTest.testMain(); |
1282 } | 1282 } |
OLD | NEW |