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

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

Issue 23534043: Don't wait for asynchronous error handlers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use _asyncSetError. Created 7 years, 3 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'package:async_helper/async_helper.dart'; 5 import 'package:async_helper/async_helper.dart';
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import 'dart:async'; 7 import 'dart:async';
8 import 'catch_errors.dart'; 8 import 'catch_errors.dart';
9 9
10 main() { 10 main() {
(...skipping 18 matching lines...) Expand all
29 throw "inner throw"; 29 throw "inner throw";
30 }).listen((x) { 30 }).listen((x) {
31 events.add("o $x"); 31 events.add("o $x");
32 }, 32 },
33 onDone: () { 33 onDone: () {
34 Expect.listEquals(["catch error entry", 34 Expect.listEquals(["catch error entry",
35 "catch error entry2", 35 "catch error entry2",
36 "after inner", 36 "after inner",
37 "main exit", 37 "main exit",
38 "i catch error", 38 "i catch error",
39 // We guarantee the order of one stream but not any
40 // global order.
Lasse Reichstein Nielsen 2013/09/05 09:17:25 Why then are we testing the exact order here? How
floitsch 2013/09/05 09:23:08 I could, but this was just easier. I don't expect
39 "o inner throw", 41 "o inner throw",
40 "i future error", 42 "i future error",
41 "i future error2", 43 "i future error2",
42 "i 499", 44 "i 499",
43 "i delayed error", 45 "i delayed error",
44 "inner done", 46 "inner done",
45 ], 47 ],
46 events); 48 events);
47 asyncEnd(); 49 asyncEnd();
48 }); 50 });
49 events.add("main exit"); 51 events.add("main exit");
50 } 52 }
OLDNEW
« sdk/lib/async/future_impl.dart ('K') | « sdk/lib/async/future_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698