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

Side by Side Diff: tests/standalone/debugger/step_in_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) 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 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 var x = a == b; // Breakpoint #1.
19 print(x);
20 b = 123;
21 a == b; // Breakpoint #2.
22 print("after 2");
23 if (a == null) { // Breakpoint #4.
24 throw "unreachable";
25 }
26 print("after 4");
27 if (null == a) {
28 throw "unreachable";
29 }
30 print("ok");
31 }
32
33 var testScript = [
34 MatchFrames(["main"]),
35 SetBreakpoint(18),
36 SetBreakpoint(21),
37 SetBreakpoint(10),
38 SetBreakpoint(23),
39 Resume(),
40 MatchFrames(["main"]), // At breakpoint #1.
41 StepInto(),
42 MatchFrames(["main"]), // Don't step into == method because of null.
43 Resume(),
44 MatchFrames(["main"]), // At breakpoint #2.
45 StepInto(),
Florian Schneider 2014/01/20 11:36:28 Remove one StepInto. The bug that requires 2 steps
46 StepInto(),
47 MatchFrames(["MyClass.==", "main"]), // At MyClass.== entry.
48 Resume(),
49 MatchFrames(["MyClass.==", "main"]), // At breakpoint #3.
50 Resume(),
51 MatchFrames(["main"]), // At breakpoint #4.
52 StepInto(),
53 MatchFrames(["main"]), // After breakpoint #4.
54 Step(),
55 MatchFrames(["main"]), // At null == a.
56 StepInto(),
57 MatchFrames(["main"]), // After null == a.
58 Resume()
59 ];
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698