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

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

Issue 12330120: Add an async descriptor to scheduled_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Windows compatibility Created 7 years, 10 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
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/src/descriptor/async.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/lib/descriptor.dart
diff --git a/pkg/scheduled_test/lib/descriptor.dart b/pkg/scheduled_test/lib/descriptor.dart
index 107390fdc8659052aa8eeb97545b8ccd7a2ca755..2ea74643e6ada8b30078eebc2d50fb47bfbe07d4 100644
--- a/pkg/scheduled_test/lib/descriptor.dart
+++ b/pkg/scheduled_test/lib/descriptor.dart
@@ -67,10 +67,12 @@ import 'dart:async';
import 'package:pathos/path.dart' as path;
import 'scheduled_test.dart';
+import 'src/descriptor/async.dart';
import 'src/descriptor/directory.dart';
import 'src/descriptor/entry.dart';
import 'src/descriptor/file.dart';
+export 'src/descriptor/async.dart';
export 'src/descriptor/directory.dart';
export 'src/descriptor/entry.dart';
export 'src/descriptor/file.dart';
@@ -96,3 +98,7 @@ File binaryFile(Pattern name, List<int> contents) =>
/// Creates a new [Directory] descriptor with [name] and [contents].
Directory dir(Pattern name, [Iterable<Entry> contents]) =>
new Directory(name, contents == null ? <Entry>[] : contents);
+
+/// Creates a new descriptor wrapping a [Future]. This descriptor forwards all
+/// asynchronous operations to the result of [future].
+Async async(Future<Entry> future) => new Async(future);
« no previous file with comments | « no previous file | pkg/scheduled_test/lib/src/descriptor/async.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698