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

Side by Side Diff: tests/language/custom_await_stack_trace_test.dart

Issue 940863002: - Allow any implementation of StackTrace to participate in async/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import "dart:async";
2 import "package:expect/expect.dart";
3
4 class Blah extends StackTrace {
5 Blah(this._trace);
6
7 toString() {
8 return "Blah " + _trace.toString();
9 }
10
11 var _trace;
12 }
13
14 foo() {
15 var x = "\nBloop\nBleep\n";
16 return new Future.error(42, new Blah(x));
17 }
18
19 main() async {
20 try {
21 var x = await foo();
22 Expect.fail("Should not reach here.");
23 } on int catch (e, s) {
24 Expect.equals(42, e);
25 Expect.equals("Blah \nBloop\nBleep\n", s.toString());
26 return;
27 }
28 Expect.fail("Unreachable.");
29 }
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698