Chromium Code Reviews| Index: pkg/scheduled_test/lib/descriptor.dart |
| diff --git a/pkg/scheduled_test/lib/descriptor.dart b/pkg/scheduled_test/lib/descriptor.dart |
| index b8baeca9f0e742568624ab18d9a4b7b196025a5a..31a8f9da67cd28e99c172b1798d3f5ca912e8785 100644 |
| --- a/pkg/scheduled_test/lib/descriptor.dart |
| +++ b/pkg/scheduled_test/lib/descriptor.dart |
| @@ -62,6 +62,8 @@ |
| /// } |
| library descriptor; |
| +import 'dart:core' as core show Pattern; |
| +import 'dart:core' hide Pattern; |
| import 'dart:async'; |
| import '../../../pkg/pathos/lib/path.dart' as path; |
| @@ -72,12 +74,14 @@ import 'src/descriptor/directory.dart'; |
| import 'src/descriptor/entry.dart'; |
| import 'src/descriptor/file.dart'; |
| import 'src/descriptor/nothing.dart'; |
| +import 'src/descriptor/pattern.dart'; |
| export 'src/descriptor/async.dart'; |
| export 'src/descriptor/directory.dart'; |
| export 'src/descriptor/entry.dart'; |
| export 'src/descriptor/file.dart'; |
| export 'src/descriptor/nothing.dart'; |
| +export 'src/descriptor/pattern.dart'; |
| /// The root path for descriptors. Top-level descriptors will be created and |
| /// validated at this path. Defaults to the current working directory. |
| @@ -91,14 +95,14 @@ set defaultRoot(String value) { |
| String _defaultRoot; |
| /// Creates a new text [File] descriptor with [name] and [contents]. |
| -File file(Pattern name, [String contents='']) => new File(name, contents); |
| +File file(String name, [String contents='']) => new File(name, contents); |
| /// Creates a new binary [File] descriptor with [name] and [contents]. |
| -File binaryFile(Pattern name, List<int> contents) => |
| +File binaryFile(String name, List<int> contents) => |
| new File.binary(name, contents); |
| /// Creates a new [Directory] descriptor with [name] and [contents]. |
| -Directory dir(Pattern name, [Iterable<Entry> contents]) => |
| +Directory dir(String name, [Iterable<Entry> contents]) => |
| new Directory(name, contents == null ? <Entry>[] : contents); |
| /// Creates a new descriptor wrapping a [Future]. This descriptor forwards all |
| @@ -107,4 +111,8 @@ Async async(Future<Entry> future) => new Async(future); |
| /// Creates a new [Nothing] descriptor that asserts that no entry named [name] |
| /// exists. |
| -Nothing nothing(Pattern name) => new Nothing(name); |
| +Nothing nothing(String name) => new Nothing(name); |
| + |
| +/// Creates a new [Pattern] descriptor that asserts than an entry with a name |
| +/// matching [pattern] exists, and matches the [Entry] returned by [fn]. |
| +Pattern pattern(core.Pattern name, EntryCreator fn) => new Pattern(name, fn); |
|
Bob Nystrom
2013/03/15 21:58:46
Eek, reusing a name from dart:core seems like a re
nweiz
2013/03/15 23:17:21
We already talked about this for the other descrip
|