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

Side by Side Diff: runtime/tests/vm/dart/error_stacktrace_test.dart

Issue 38343004: - Don't mix the collection of Error.stackTrace with the collection of (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/exceptions.cc » ('j') | runtime/vm/exceptions.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4 // Test that the full stacktrace in an error object matches the stacktrace
5 // handed to the catch clause.
6 library test.error_stacktrace;
7
8 import "package:expect/expect.dart";
9
10 class C {
11 // operator*(o) is missing to trigger a noSuchMethodError when a C object
12 // is used in the multiplication below.
13 }
14
15 bar(c) => c * 4;
16 foo(c) => bar(c);
17
18 main() {
19 try {
20 var a = foo(new C());
21 } catch (e, s) {
22 print(e);
23 print("###");
24 print(e.stackTrace);
25 print("###");
26 print(s);
27 print("###");
28 Expect.isTrue(e is NoSuchMethodError);
29 Expect.stringEquals(e.stackTrace.toString(), s.toString());
30 }
31 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/exceptions.cc » ('j') | runtime/vm/exceptions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698