| OLD | NEW |
| 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; |
| 6 |
| 5 import 'dart:async'; | 7 import 'dart:async'; |
| 6 import 'dart:isolate'; | 8 import 'dart:isolate'; |
| 7 | 9 |
| 8 testFutureAsStreamCompleteAfter() { | 10 testFutureAsStreamCompleteAfter() { |
| 9 var completer = new Completer(); | 11 var completer = new Completer(); |
| 10 bool gotValue = false; | 12 bool gotValue = false; |
| 11 var port = new ReceivePort(); | 13 var port = new ReceivePort(); |
| 12 completer.future.asStream().listen( | 14 completer.future.asStream().listen( |
| 13 (data) { | 15 (data) { |
| 14 Expect.isFalse(gotValue); | 16 Expect.isFalse(gotValue); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 testFutureAsStreamCompleteImmediate(); | 189 testFutureAsStreamCompleteImmediate(); |
| 188 testFutureAsStreamCompleteErrorAfter(); | 190 testFutureAsStreamCompleteErrorAfter(); |
| 189 testFutureAsStreamWrapper(); | 191 testFutureAsStreamWrapper(); |
| 190 | 192 |
| 191 testFutureWhenCompleteValue(); | 193 testFutureWhenCompleteValue(); |
| 192 testFutureWhenCompleteError(); | 194 testFutureWhenCompleteError(); |
| 193 testFutureWhenCompleteValueNewError(); | 195 testFutureWhenCompleteValueNewError(); |
| 194 testFutureWhenCompleteErrorNewError(); | 196 testFutureWhenCompleteErrorNewError(); |
| 195 } | 197 } |
| 196 | 198 |
| OLD | NEW |