| 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 // Directory listing test. | 5 // Directory listing test. |
| 6 | 6 |
| 7 #import("dart:io"); | 7 #import("dart:io"); |
| 8 #import("dart:isolate"); | 8 #import("dart:isolate"); |
| 9 | 9 |
| 10 class DirectoryTest { | 10 class DirectoryTest { |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 if (createdDirectories.length < nestingDepth) { | 407 if (createdDirectories.length < nestingDepth) { |
| 408 temp = new Directory( | 408 temp = new Directory( |
| 409 '${temp.path}/nested_temp_dir_${createdDirectories.length}_'); | 409 '${temp.path}/nested_temp_dir_${createdDirectories.length}_'); |
| 410 temp.createTemp().then(createPhaseCallback); | 410 temp.createTemp().then(createPhaseCallback); |
| 411 } else { | 411 } else { |
| 412 deletePhaseCallback(); | 412 deletePhaseCallback(); |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 | 415 |
| 416 void deletePhaseCallback() { | 416 void deletePhaseCallback() { |
| 417 if (!createdDirectories.isEmpty()) { | 417 if (!createdDirectories.isEmpty) { |
| 418 current = createdDirectories.removeLast(); | 418 current = createdDirectories.removeLast(); |
| 419 current.deleteSync(); | 419 current.deleteSync(); |
| 420 deletePhaseCallback(); | 420 deletePhaseCallback(); |
| 421 } | 421 } |
| 422 } | 422 } |
| 423 | 423 |
| 424 static void testMain() { | 424 static void testMain() { |
| 425 new NestedTempDirectoryTest.run(); | 425 new NestedTempDirectoryTest.run(); |
| 426 new NestedTempDirectoryTest.run(); | 426 new NestedTempDirectoryTest.run(); |
| 427 } | 427 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 DirectoryTest.testMain(); | 560 DirectoryTest.testMain(); |
| 561 NestedTempDirectoryTest.testMain(); | 561 NestedTempDirectoryTest.testMain(); |
| 562 testCreateTempErrorSync(); | 562 testCreateTempErrorSync(); |
| 563 testCreateTempError(); | 563 testCreateTempError(); |
| 564 testCreateExistingSync(); | 564 testCreateExistingSync(); |
| 565 testCreateExisting(); | 565 testCreateExisting(); |
| 566 testCreateDirExistingFileSync(); | 566 testCreateDirExistingFileSync(); |
| 567 testCreateDirExistingFile(); | 567 testCreateDirExistingFile(); |
| 568 testRename(); | 568 testRename(); |
| 569 } | 569 } |
| OLD | NEW |