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

Side by Side Diff: tests/standalone/debugger/mixin_closure_debugger_test.dart

Issue 102453002: VM debugger: fix closures in mixed-in functions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 | « tests/standalone/debugger/debug_lib.dart ('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 // 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
5 // This test forks a second vm process that runs this dart script as
6 // a debug target.
7 // Run this test with option --wire to see the json messages sent
8 // between the processes.
9 // Run this test with option --verbose to see the stdout and stderr output
10 // of the debug target process.
11
12 // This test checks that a breakpoint can be set and is hit in a closure
13 // inside a mixin function. Regression test for issue 15325.
14
15 import "debug_lib.dart";
16
17 class S { }
18
19 class M {
20 m() {
21 var sum = 0;
22 [1,2,3].forEach((e) {
23 sum += e; // Breakpoint here.
24 });
25 return sum;
26 }
27 }
28
29 class A = S with M;
30
31 main(List<String> arguments) {
32 if (RunScript(testScript, arguments)) return;
33 var a = new A();
34 print(a.m());
35 }
36
37 // Expected debugger events and commands.
38 var testScript = [
39 MatchFrame(0, "main"), // Top frame in trace is function "main".
40 SetBreakpoint(23), // Set breakpoint inside the forEach closure.
41 Resume(),
42 MatchFrames(["S&M.<anonymous closure>", "forEach", "S&M.m"],
43 exactMatch: false), // First iteration.
44 MatchLocals({"e": "1"}),
45 Resume(),
46 MatchFrames(["S&M.<anonymous closure>", "forEach", "S&M.m"],
47 exactMatch: false), // Second iteration.
48 MatchLocals({"e": "2"}),
49 Resume(),
50 MatchFrames(["S&M.<anonymous closure>", "forEach", "S&M.m"],
51 exactMatch: false), // Third iteration.
52 MatchLocals({"e": "3"}),
53 Resume(),
54 ];
OLDNEW
« no previous file with comments | « tests/standalone/debugger/debug_lib.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698