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

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

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
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; 5 library future_delayed_error_test;
6 6
7 import "package:expect/expect.dart";
7 import 'dart:async'; 8 import 'dart:async';
8 import 'dart:isolate'; 9 import 'dart:isolate';
9 10
10 testImmediateError() { 11 testImmediateError() {
11 // An open ReceivePort keeps the VM running. If the error-handler below is not 12 // An open ReceivePort keeps the VM running. If the error-handler below is not
12 // executed then the test will fail with a timeout. 13 // executed then the test will fail with a timeout.
13 var port = new ReceivePort(); 14 var port = new ReceivePort();
14 var future = new Future.immediateError("error"); 15 var future = new Future.immediateError("error");
15 future.catchError((e) { 16 future.catchError((e) {
16 port.close(); 17 port.close();
(...skipping 13 matching lines...) Expand all
30 port.close(); 31 port.close();
31 Expect.equals(e.error, "foobar"); 32 Expect.equals(e.error, "foobar");
32 }); 33 });
33 } 34 }
34 35
35 main() { 36 main() {
36 testImmediateError(); 37 testImmediateError();
37 testDelayedError(); 38 testDelayedError();
38 } 39 }
39 40
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698