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

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

Issue 11576053: Add basic standalone debugger test (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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
OLDNEW
(Empty)
1 // Copyright (c) 2012, 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 import "debug_lib.dart";
13
14 bar(x) {
15 print(x);
16 }
17
18 foo(i) {
19 bar("baz");
20 print(i);
21 }
22
23 main() {
24 if (RunScript(testScript)) return;
25 print("Hello from debuggee");
26 foo(42);
27 print("Hello again");
28 }
29
30
31 // Expected debugger events and commands.
32 var testScript = [
33 Breakpoint(), // Expect a breakpoint event.
34 MatchFrame(0, "main"), // Top frame in trace is function "main".
35 Step(),
36 Breakpoint(function: "main"),
37 SetBreakpoint(8), // Set breakpoint a line 15, in function bar.
38 Resume(),
39 Breakpoint(function: "bar"),
40 MatchFrames(["bar", "foo", "main"]),
41 MatchFrame(1, "foo"),
42 Resume(),
43 ];
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/debugger/debug_lib.dart » ('j') | tests/standalone/debugger/debug_lib.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698