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

Unified Diff: tests/lib/async/stack_trace09_test.dart

Issue 25094002: Adapt streams for additional stackTrace argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove types in closures. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/lib/async/stack_trace10_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stack_trace09_test.dart
diff --git a/tests/lib/async/stack_trace23_test.dart b/tests/lib/async/stack_trace09_test.dart
similarity index 63%
copy from tests/lib/async/stack_trace23_test.dart
copy to tests/lib/async/stack_trace09_test.dart
index 1cde7830c647c8ffc893c35522b54f5bbb53f30c..4209f3ce1fb99294c8061fb712da7acc9013da35 100644
--- a/tests/lib/async/stack_trace23_test.dart
+++ b/tests/lib/async/stack_trace09_test.dart
@@ -16,14 +16,17 @@ StackTrace captureStackTrace() {
main() {
StackTrace trace = captureStackTrace();
+ var controller;
+ controller = new StreamController(onListen: () {
+ controller.addError("error", trace);
+ controller.close();
+ });
asyncStart();
- var f = new Future.error(499, trace);
- f.catchError((e) { throw "unreachable"; }, test: (e) {
- Expect.equals(499, e);
- return false;
- })
- .catchError((e, st) {
+ controller.stream
+ .handleError((e, st) {
+ Expect.equals("error", e);
Expect.identical(trace, st);
- asyncEnd();
- }, test: (e) => e == 499);
+ })
+ .listen((x) { throw "should never be reached"; },
+ onDone: asyncEnd);
}
« no previous file with comments | « sdk/lib/io/websocket_impl.dart ('k') | tests/lib/async/stack_trace10_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698