OLD | NEW |
---|---|
(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() { | |
15 if (RunScript(testScript)) return; | |
16 var a = new MyClass(); | |
17 var b = null; | |
18 var x = a == b; // Breakpoint #1. | |
hausner
2013/09/25 16:36:11
I think the case of comparing to null explicitly i
Florian Schneider
2013/09/26 11:34:21
Done. Appended (x == null) and (null == x) to the
| |
19 print(x); | |
20 b = 123; | |
21 a == b; // Breakpoint #2. | |
22 print("ok"); | |
23 } | |
24 | |
25 var testScript = [ | |
26 MatchFrames(["main"]), | |
27 SetBreakpoint(18), | |
28 SetBreakpoint(21), | |
29 SetBreakpoint(10), | |
30 Resume(), | |
31 MatchFrames(["main"]), // At breakpoint #1. | |
32 StepInto(), | |
33 MatchFrames(["main"]), // Don't step into == method because of null. | |
34 Resume(), | |
35 MatchFrames(["main"]), // At breakpoint #2. | |
36 StepInto(), | |
37 StepInto(), | |
38 MatchFrames(["MyClass.==", "main"]), // At MyClass.== entry. | |
39 Resume(), | |
40 MatchFrames(["MyClass.==", "main"]), // At breakpoint #3. | |
41 Resume() | |
42 ]; | |
OLD | NEW |