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

Unified Diff: test/descriptor/tar.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 5 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 | « test/descriptor/packages.dart ('k') | test/implicit_barback_dependency_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/descriptor/tar.dart
diff --git a/test/descriptor/tar.dart b/test/descriptor/tar.dart
index 22583102931d2f4b92ee530a3a3680bb37685901..18c34e6f538b0d8496ea435a3de9aae6efcbed03 100644
--- a/test/descriptor/tar.dart
+++ b/test/descriptor/tar.dart
@@ -18,23 +18,24 @@ class TarFileDescriptor extends DirectoryDescriptor
/// Creates the files and directories within this tar file, then archives
/// them, compresses them, and saves the result to [parentDir].
- Future<String> create([String parent]) => schedule(() {
- if (parent == null) parent = defaultRoot;
- return withTempDir((tempDir) {
- return Future.wait(contents.map((entry) {
- return entry.create(tempDir);
- })).then((_) {
+ Future<String> create([String parent]) {
+ return schedule/*<Future<String>>*/(() async {
+ if (parent == null) parent = defaultRoot;
+ return await withTempDir((tempDir) async {
+ await Future.wait(contents.map((entry) => entry.create(tempDir)));
+
var createdContents = listDir(tempDir,
recursive: true,
includeHidden: true);
- return createTarGz(createdContents, baseDir: tempDir).toBytes();
- }).then((bytes) {
+ var bytes = await createTarGz(createdContents, baseDir: tempDir)
+ .toBytes();
+
var file = path.join(parent, name);
writeBinaryFile(file, bytes);
return file;
});
- });
- }, 'creating tar file:\n${describe()}');
+ }, 'creating tar file:\n${describe()}');
+ }
/// Validates that the `.tar.gz` file at [path] contains the expected
/// contents.
« no previous file with comments | « test/descriptor/packages.dart ('k') | test/implicit_barback_dependency_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698