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

Unified Diff: utils/tests/archive/reader_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « utils/testrunner/run_pipeline.dart ('k') | utils/tests/pub/curl_client_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/tests/archive/reader_test.dart
diff --git a/utils/tests/archive/reader_test.dart b/utils/tests/archive/reader_test.dart
index 77fd88f2bb4e52bf50a1831a5a962709dc9ec67f..55a0a14ab5a4537cb228f1575ef79d69a4a906dc 100644
--- a/utils/tests/archive/reader_test.dart
+++ b/utils/tests/archive/reader_test.dart
@@ -19,7 +19,7 @@ main() {
reader.filter.gzip = true;
var future = reader.openFilename("$dataPath/test-archive.tar.gz")
- .transform((input) {
+ .then((input) {
var log = <String>[];
input.onEntry = (entry) => guardAsync(() {
log.add("Entry: ${entry.pathname}");
@@ -56,8 +56,10 @@ main() {
var future = reader.openFilename("$dataPath/test-archive.tar.gz")
.chain((input) => input.readAll())
- .transform((entries) {
- entries = entries.map((entry) => [entry.pathname, entry.contents.trim()]);
+ .then((entries) {
+ entries = entries
+ .mappedBy((entry) => [entry.pathname, entry.contents.trim()])
+ .toList();
expect(entries[0], orderedEquals(["filename1", "contents 1"]));
expect(entries[1], orderedEquals(["filename2", "contents 2"]));
expect(entries[2], orderedEquals(["filename3", "contents 3"]));
@@ -75,7 +77,7 @@ main() {
var future = new File("$dataPath/test-archive.tar.gz").readAsBytes()
.chain((bytes) => reader.openData(bytes))
- .transform((input) {
+ .then((input) {
var log = <String>[];
input.onEntry = (entry) => guardAsync(() {
log.add("Entry: ${entry.pathname}");
@@ -113,7 +115,7 @@ main() {
reader.filter.gzip = true;
var future = reader.openFilename("$dataPath/test-archive.tar.gz")
- .transform((input) {
+ .then((input) {
var log = <String>[];
input.onEntry = (entry) => guardAsync(() {
log.add("Entry: ${entry.pathname}");
@@ -150,7 +152,7 @@ main() {
reader.filter.gzip = true;
var future = reader.openFilename("$dataPath/test-archive.tar.gz")
- .transform((input) {
+ .then((input) {
var count = 0;
var log = <String>[];
« no previous file with comments | « utils/testrunner/run_pipeline.dart ('k') | utils/tests/pub/curl_client_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698