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

Side by Side Diff: tests/lib/async/future_test.dart

Issue 11865005: Remove Futures class, move methods to Future. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/async/future.dart ('k') | tests/lib/async/futures_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library future_test; 5 library future_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:isolate'; 8 import 'dart:isolate';
9 9
10 testImmediate() { 10 testImmediate() {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 int after1; 69 int after1;
70 int after2; 70 int after2;
71 71
72 var futures = []; 72 var futures = [];
73 futures.add(future.then((int v) { before = v; })); 73 futures.add(future.then((int v) { before = v; }));
74 completer.complete(3); 74 completer.complete(3);
75 futures.add(future.then((int v) { after1 = v; })); 75 futures.add(future.then((int v) { after1 = v; }));
76 futures.add(future.then((int v) { after2 = v; })); 76 futures.add(future.then((int v) { after2 = v; }));
77 77
78 var port = new ReceivePort(); 78 var port = new ReceivePort();
79 new Future.wait(futures).then((_) { 79 Future.wait(futures).then((_) {
80 Expect.equals(3, before); 80 Expect.equals(3, before);
81 Expect.equals(3, after1); 81 Expect.equals(3, after1);
82 Expect.equals(3, after2); 82 Expect.equals(3, after2);
83 port.close(); 83 port.close();
84 }); 84 });
85 } 85 }
86 86
87 // Tests for [catchError] 87 // Tests for [catchError]
88 88
89 testException() { 89 testException() {
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 testFutureWhenErrorFutureValue(); 549 testFutureWhenErrorFutureValue();
550 testFutureWhenValueFutureError(); 550 testFutureWhenValueFutureError();
551 testFutureWhenErrorFutureError(); 551 testFutureWhenErrorFutureError();
552 552
553 testFutureThenThrowsAsync(); 553 testFutureThenThrowsAsync();
554 testFutureCatchThrowsAsync(); 554 testFutureCatchThrowsAsync();
555 testFutureWhenThrowsAsync(); 555 testFutureWhenThrowsAsync();
556 testFutureCatchRethrowsAsync(); 556 testFutureCatchRethrowsAsync();
557 } 557 }
558 558
OLDNEW
« no previous file with comments | « sdk/lib/async/future.dart ('k') | tests/lib/async/futures_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698