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

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

Issue 11778030: Test fixes for dartium (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 | « tests/lib/async/future2_test.dart ('k') | tests/lib/async/future_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_delayed_error_test;
6
5 import 'dart:async'; 7 import 'dart:async';
6 import 'dart:isolate'; 8 import 'dart:isolate';
7 9
8 testImmediateError() { 10 testImmediateError() {
9 // An open ReceivePort keeps the VM running. If the error-handler below is not 11 // An open ReceivePort keeps the VM running. If the error-handler below is not
10 // executed then the test will fail with a timeout. 12 // executed then the test will fail with a timeout.
11 var port = new ReceivePort(); 13 var port = new ReceivePort();
12 var future = new Future.immediateError("error"); 14 var future = new Future.immediateError("error");
13 future.catchError((e) { 15 future.catchError((e) {
14 port.close(); 16 port.close();
(...skipping 13 matching lines...) Expand all
28 port.close(); 30 port.close();
29 Expect.equals(e.error, "foobar"); 31 Expect.equals(e.error, "foobar");
30 }); 32 });
31 } 33 }
32 34
33 main() { 35 main() {
34 testImmediateError(); 36 testImmediateError();
35 testDelayedError(); 37 testDelayedError();
36 } 38 }
37 39
OLDNEW
« no previous file with comments | « tests/lib/async/future2_test.dart ('k') | tests/lib/async/future_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698