| 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 /// A library for declaratively describing a filesystem structure, usually for | 5 /// A library for declaratively describing a filesystem structure, usually for |
| 6 /// the purpose of creating or validating it as part of a scheduled test. | 6 /// the purpose of creating or validating it as part of a scheduled test. |
| 7 /// | 7 /// |
| 8 /// You can use [dir] and [file] to define a filesystem structure. Then, you can | 8 /// You can use [dir] and [file] to define a filesystem structure. Then, you can |
| 9 /// call [Entry.create] to schedule a task that will create that structure on | 9 /// call [Entry.create] to schedule a task that will create that structure on |
| 10 /// the physical filesystem, or [Entry.validate] to schedule an assertion that | 10 /// the physical filesystem, or [Entry.validate] to schedule an assertion that |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 /// return tempDir.delete(recursive: true); | 57 /// return tempDir.delete(recursive: true); |
| 58 /// }); | 58 /// }); |
| 59 /// }); | 59 /// }); |
| 60 /// | 60 /// |
| 61 /// // ... | 61 /// // ... |
| 62 /// } | 62 /// } |
| 63 library descriptor; | 63 library descriptor; |
| 64 | 64 |
| 65 import 'dart:async'; | 65 import 'dart:async'; |
| 66 | 66 |
| 67 import 'package:pathos/path.dart' as path; | 67 import '../../../pkg/pathos/lib/path.dart' as path; |
| 68 | 68 |
| 69 import 'scheduled_test.dart'; | 69 import 'scheduled_test.dart'; |
| 70 import 'src/descriptor/async.dart'; | 70 import 'src/descriptor/async.dart'; |
| 71 import 'src/descriptor/directory.dart'; | 71 import 'src/descriptor/directory.dart'; |
| 72 import 'src/descriptor/entry.dart'; | 72 import 'src/descriptor/entry.dart'; |
| 73 import 'src/descriptor/file.dart'; | 73 import 'src/descriptor/file.dart'; |
| 74 import 'src/descriptor/nothing.dart'; | 74 import 'src/descriptor/nothing.dart'; |
| 75 | 75 |
| 76 export 'src/descriptor/async.dart'; | 76 export 'src/descriptor/async.dart'; |
| 77 export 'src/descriptor/directory.dart'; | 77 export 'src/descriptor/directory.dart'; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 101 Directory dir(Pattern name, [Iterable<Entry> contents]) => | 101 Directory dir(Pattern name, [Iterable<Entry> contents]) => |
| 102 new Directory(name, contents == null ? <Entry>[] : contents); | 102 new Directory(name, contents == null ? <Entry>[] : contents); |
| 103 | 103 |
| 104 /// Creates a new descriptor wrapping a [Future]. This descriptor forwards all | 104 /// Creates a new descriptor wrapping a [Future]. This descriptor forwards all |
| 105 /// asynchronous operations to the result of [future]. | 105 /// asynchronous operations to the result of [future]. |
| 106 Async async(Future<Entry> future) => new Async(future); | 106 Async async(Future<Entry> future) => new Async(future); |
| 107 | 107 |
| 108 /// Creates a new [Nothing] descriptor that asserts that no entry named [name] | 108 /// Creates a new [Nothing] descriptor that asserts that no entry named [name] |
| 109 /// exists. | 109 /// exists. |
| 110 Nothing nothing(Pattern name) => new Nothing(name); | 110 Nothing nothing(Pattern name) => new Nothing(name); |
| OLD | NEW |