Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1380)

Unified Diff: pkg/scheduled_test/lib/src/descriptor/descriptor.dart

Issue 16351003: Move pub over to using the pub.dartlang.org API v2. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/scheduled_test/lib/src/descriptor/descriptor.dart
diff --git a/pkg/scheduled_test/lib/src/descriptor/descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/descriptor.dart
index 1dc2c949f7e62ec344d9cdefe7aa01b87f651985..e2341182ae29f66b08a80047d90e34094bacc106 100644
--- a/pkg/scheduled_test/lib/src/descriptor/descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/descriptor.dart
@@ -35,6 +35,12 @@ abstract class Descriptor {
/// need to be caught, since otherwise they'd be registered by the schedule.
Future validateNow([String parent]);
+ /// Returns a detailed tree-style description of [this].
+ String describe();
+}
+
+/// An interface for descriptors that can load the contents of sub-descriptors.
+abstract class LoadableDescriptor extends Descriptor {
/// Treats [this] as an in-memory filesystem and returns a stream of the
/// contents of the child entry located at [path]. This only works if [this]
/// is a directory entry. This operation is not [schedule]d.
@@ -44,16 +50,15 @@ abstract class Descriptor {
///
/// All errors in loading the file will be passed through the returned
/// [Stream].
- Stream<List<int>> load(String pathToLoad) => errorStream("Can't load "
- "'$pathToLoad' from within '$name': not a directory.");
+ Stream<List<int>> load(String pathToLoad);
+}
+/// An interface for descriptors whose contents can be read.
+abstract class ReadableDescriptor extends Descriptor {
/// Returns the contents of [this] as a stream. This only works if [this] is a
/// file entry. This operation is not [schedule]d.
///
/// All errors in loading the file will be passed through the returned
/// [Stream].
Stream<List<int>> read();
-
- /// Returns a detailed tree-style description of [this].
- String describe();
}

Powered by Google App Engine
This is Rietveld 408576698