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

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

Issue 12853005: Change the way Patterns work in scheduled_test/descriptor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add Nothing.validateNow. Created 7 years, 9 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/async.dart
diff --git a/pkg/scheduled_test/lib/src/descriptor/async.dart b/pkg/scheduled_test/lib/src/descriptor/async.dart
index c33a68cb7532faa337544d15ddb8cc024915bdee..8e72e289040c3517173a8eebcbdf8730699a326c 100644
--- a/pkg/scheduled_test/lib/src/descriptor/async.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/async.dart
@@ -10,7 +10,6 @@ import 'dart:io' as io;
import '../../descriptor.dart' as descriptor;
import '../../scheduled_test.dart';
import '../utils.dart';
-import 'utils.dart';
/// A descriptor that wraps a [Future<Entry>] and forwards all asynchronous
/// operations to the result of the future. It's designed for use when the
@@ -29,8 +28,10 @@ class Async extends descriptor.Entry {
Future create([String parent]) =>
schedule(() => future.then((entry) => entry.create(parent)));
- Future validate([String parent]) =>
- schedule(() => future.then((entry) => entry.validate(parent)));
+ Future validate([String parent]) => schedule(() => validateNow(parent));
Bob Nystrom 2013/03/15 21:58:46 Can this just be the default implementation of val
nweiz 2013/03/15 23:17:21 I want to encourage subclasses to add descriptions
Bob Nystrom 2013/03/18 21:06:34 Good point.
+
+ Future validateNow([String parent]) =>
+ future.then((entry) => entry.validateNow(parent));
Stream<List<int>> load(String path) => errorStream("Async descriptors don't "
"support load().");

Powered by Google App Engine
This is Rietveld 408576698