| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 1245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 new File(path).existsSync() ? path : 'runtime/$path'; | 1256 new File(path).existsSync() ? path : 'runtime/$path'; |
| 1257 | 1257 |
| 1258 static String getDataFilename(String path) => | 1258 static String getDataFilename(String path) => |
| 1259 new File(path).existsSync() ? path : '../$path'; | 1259 new File(path).existsSync() ? path : '../$path'; |
| 1260 | 1260 |
| 1261 // Main test entrypoint. | 1261 // Main test entrypoint. |
| 1262 static testMain() { | 1262 static testMain() { |
| 1263 testRead(); | 1263 testRead(); |
| 1264 testReadSync(); | 1264 testReadSync(); |
| 1265 testReadStream(); | 1265 testReadStream(); |
| 1266 testLength(); | |
| 1267 testLengthSync(); | 1266 testLengthSync(); |
| 1268 testPosition(); | |
| 1269 testPositionSync(); | 1267 testPositionSync(); |
| 1270 testOpenDirectoryAsFile(); | 1268 testOpenDirectoryAsFile(); |
| 1271 testOpenDirectoryAsFileSync(); | 1269 testOpenDirectoryAsFileSync(); |
| 1272 testOpenFile(); | 1270 testOpenFile(); |
| 1273 testReadAsBytes(); | |
| 1274 testReadAsBytesEmptyFile(); | |
| 1275 testReadAsBytesSync(); | 1271 testReadAsBytesSync(); |
| 1276 testReadAsBytesSyncEmptyFile(); | 1272 testReadAsBytesSyncEmptyFile(); |
| 1277 testReadAsText(); | |
| 1278 testReadAsTextEmptyFile(); | |
| 1279 testReadAsTextSync(); | 1273 testReadAsTextSync(); |
| 1280 testReadAsTextSyncEmptyFile(); | 1274 testReadAsTextSyncEmptyFile(); |
| 1281 testReadAsLines(); | |
| 1282 testReadAsLinesSync(); | 1275 testReadAsLinesSync(); |
| 1283 testReadAsErrors(); | |
| 1284 testLastModified(); | |
| 1285 testLastModifiedSync(); | 1276 testLastModifiedSync(); |
| 1286 | 1277 |
| 1287 createTempDirectory(() { | 1278 createTempDirectory(() { |
| 1279 testLength(); |
| 1288 testReadWrite(); | 1280 testReadWrite(); |
| 1289 testReadWriteSync(); | 1281 testReadWriteSync(); |
| 1290 testReadWriteNoArgsSync(); | 1282 testReadWriteNoArgsSync(); |
| 1291 testReadWriteStream(); | 1283 testReadWriteStream(); |
| 1292 testReadEmptyFileSync(); | 1284 testReadEmptyFileSync(); |
| 1293 testReadEmptyFile(); | 1285 testReadEmptyFile(); |
| 1294 testReadWriteStreamLargeFile(); | 1286 testReadWriteStreamLargeFile(); |
| 1287 testReadAsBytes(); |
| 1288 testReadAsBytesEmptyFile(); |
| 1289 testReadAsText(); |
| 1290 testReadAsTextEmptyFile(); |
| 1291 testReadAsLines(); |
| 1292 testReadAsErrors(); |
| 1293 testPosition(); |
| 1295 testTruncate(); | 1294 testTruncate(); |
| 1296 testTruncateSync(); | 1295 testTruncateSync(); |
| 1297 testCloseException(); | 1296 testCloseException(); |
| 1298 testCloseExceptionStream(); | 1297 testCloseExceptionStream(); |
| 1299 testBufferOutOfBoundsException(); | 1298 testBufferOutOfBoundsException(); |
| 1300 testAppend(); | 1299 testAppend(); |
| 1301 testAppendSync(); | 1300 testAppendSync(); |
| 1302 testWriteAppend(); | 1301 testWriteAppend(); |
| 1303 testOutputStreamWriteAppend(); | 1302 testOutputStreamWriteAppend(); |
| 1304 testOutputStreamWriteString(); | 1303 testOutputStreamWriteString(); |
| 1305 testWriteVariousLists(); | 1304 testWriteVariousLists(); |
| 1306 testDirectory(); | 1305 testDirectory(); |
| 1307 testDirectorySync(); | 1306 testDirectorySync(); |
| 1308 testWriteStringUtf8(); | 1307 testWriteStringUtf8(); |
| 1309 testWriteStringUtf8Sync(); | 1308 testWriteStringUtf8Sync(); |
| 1310 testRename(); | 1309 testRename(); |
| 1311 testRenameSync(); | 1310 testRenameSync(); |
| 1311 testLastModified(); |
| 1312 }); | 1312 }); |
| 1313 } | 1313 } |
| 1314 } | 1314 } |
| 1315 | 1315 |
| 1316 main() { | 1316 main() { |
| 1317 FileTest.testMain(); | 1317 FileTest.testMain(); |
| 1318 } | 1318 } |
| OLD | NEW |