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

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

Issue 135843003: Fix several little buglets with stepping (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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
OLDNEW
(Empty)
1 // Copyright (c) 2014, 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 import "debug_lib.dart";
6
7 class MyClass {
8 operator ==(other) {
9 print(other);
10 return true; // Breakpoint #3.
11 }
12 }
13
14 main(List<String> arguments) {
15 if (RunScript(testScript, arguments)) return;
16 var a = new MyClass();
17 var b = null;
18 a == b; // Breakpoint #1.
19 print("after 1");
20 b = 123;
21 a == b; // Breakpoint #2.
22 print("after 2");
23 a == null; // Breakpoint #4.
24 print("after 4");
25 if (null == a) {
26 throw "unreachable";
27 }
28 print("ok");
29 }
30
31 // Checks that debugger can stop at calls to == even if one
32 // of the operands is null.
33
34 var testScript = [
35 MatchFrames(["main"]),
36 MatchLine(15),
37 SetBreakpoint(18),
38 SetBreakpoint(21),
39 SetBreakpoint(10),
40 SetBreakpoint(23),
41 Resume(),
42 MatchFrames(["main"]),
43 MatchLine(18), // At breakpoint #1.
44 Resume(),
45 MatchLine(21), // At breakpoint #2; didn't hit breakpoint in MyClass.==.
46 Resume(),
47 MatchFrames(["MyClass.==", "main"]),
48 MatchLine(10), // At breakpoint #3 in MyClass.==.
49 Resume(),
50 MatchLine(23), // At breakpoint #4.
51 Resume()
Florian Schneider 2014/01/17 10:18:01 Why doesn't this new test does test single steppin
52 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698