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

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

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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 | « tests/lib/async/future_test.dart ('k') | tests/lib/async/slow_consumer2_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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 futures_test; 5 library futures_test;
6 import "package:expect/expect.dart";
7 import 'dart:async'; 6 import 'dart:async';
8 import 'dart:isolate'; 7 import 'dart:isolate';
9 8
10 Future testWaitEmpty() { 9 Future testWaitEmpty() {
11 List<Future> futures = new List<Future>(); 10 List<Future> futures = new List<Future>();
12 return Future.wait(futures); 11 return Future.wait(futures);
13 } 12 }
14 13
15 Future testCompleteAfterWait() { 14 Future testCompleteAfterWait() {
16 List<Future> futures = new List<Future>(); 15 List<Future> futures = new List<Future>();
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 futures.add(testForEachWithException()); 114 futures.add(testForEachWithException());
116 115
117 // Use a receive port for blocking the test. 116 // Use a receive port for blocking the test.
118 // Note that if the test fails, the program will not end. 117 // Note that if the test fails, the program will not end.
119 ReceivePort port = new ReceivePort(); 118 ReceivePort port = new ReceivePort();
120 Future.wait(futures).then((List list) { 119 Future.wait(futures).then((List list) {
121 Expect.equals(9, list.length); 120 Expect.equals(9, list.length);
122 port.close(); 121 port.close();
123 }); 122 });
124 } 123 }
OLDNEW
« no previous file with comments | « tests/lib/async/future_test.dart ('k') | tests/lib/async/slow_consumer2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698