1a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Copyright 2008 the V8 project authors. All rights reserved.
2a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Redistribution and use in source and binary forms, with or without
3a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// modification, are permitted provided that the following conditions are
4a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// met:
5a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//
6a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//     * Redistributions of source code must retain the above copyright
7a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//       notice, this list of conditions and the following disclaimer.
8a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//     * Redistributions in binary form must reproduce the above
9a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//       copyright notice, this list of conditions and the following
10a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//       disclaimer in the documentation and/or other materials provided
11a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//       with the distribution.
12a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//     * Neither the name of Google Inc. nor the names of its
13a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//       contributors may be used to endorse or promote products derived
14a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//       from this software without specific prior written permission.
15a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//
16a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block
28a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Flags: --expose-debug-as debug
29a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Get the Debug object exposed from the debug context global object.
30a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug = debug.Debug
31a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block
32a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockfunction f() {a=1;b=2};
33a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockfunction g() {
34a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block  a=1;
35a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block  b=2;
36a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block}
37a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block
38a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp = Debug.setBreakPoint(f, 0, 0);
39a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertEquals("() {[B0]a=1;b=2}", Debug.showBreakPoints(f));
40a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp);
41a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertEquals("() {a=1;b=2}", Debug.showBreakPoints(f));
42a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp1 = Debug.setBreakPoint(f, 0, 8);
43a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertEquals("() {a=1;[B0]b=2}", Debug.showBreakPoints(f));
44a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp2 = Debug.setBreakPoint(f, 0, 4);
45a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertEquals("() {[B0]a=1;[B1]b=2}", Debug.showBreakPoints(f));
46bb769b257e753aafcbd96767abb2abc645eaa20cBen Murdochbp3 = Debug.setBreakPoint(f, 0, 11);
47bb769b257e753aafcbd96767abb2abc645eaa20cBen MurdochassertEquals("() {[B0]a=1;[B1]b=2[B2]}", Debug.showBreakPoints(f));
48a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp1);
49bb769b257e753aafcbd96767abb2abc645eaa20cBen MurdochassertEquals("() {[B0]a=1;b=2[B1]}", Debug.showBreakPoints(f));
50a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp2);
51bb769b257e753aafcbd96767abb2abc645eaa20cBen MurdochassertEquals("() {a=1;b=2[B0]}", Debug.showBreakPoints(f));
52a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp3);
53a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertEquals("() {a=1;b=2}", Debug.showBreakPoints(f));
54a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block
55a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// The following test checks that the Debug.showBreakPoints(g) produces output
56a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// like follows when changein breakpoints.
57a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//
58a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
59a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [BX]a=1;
60a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [BX]b=2;
61a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }[BX]
62a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block
63a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Test set and clear breakpoint at the first possible location (line 0,
64a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// position 0).
65a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp = Debug.setBreakPoint(g, 0, 0);
66a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
67a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B0]a=1;
68a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   b=2;
69a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }
70a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
71a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp);
72a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
73a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   a=1;
74a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   b=2;
75a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }
76a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
77a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block
78a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// Second test set and clear breakpoints on lines 1, 2 and 3 (position = 0).
79a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp1 = Debug.setBreakPoint(g, 2, 0);
80a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
81a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   a=1;
82a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B0]b=2;
83a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }
84a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]b=2;") > 0);
85a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp2 = Debug.setBreakPoint(g, 1, 0);
86a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
87a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B0]a=1;
88a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B1]b=2;
89a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }
90a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
91a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B1]b=2;") > 0);
92a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Blockbp3 = Debug.setBreakPoint(g, 3, 0);
93a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
94a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B0]a=1;
95a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B1]b=2;
96a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }[B2]
97a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
98a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B1]b=2;") > 0);
99bb769b257e753aafcbd96767abb2abc645eaa20cBen MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B2]}") > 0);
100a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp1);
101a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
102a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   [B0]a=1;
103a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   b=2;
104a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }[B1]
105a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
106bb769b257e753aafcbd96767abb2abc645eaa20cBen MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B1]}") > 0);
107a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B2]") < 0);
108a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp2);
109a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
110a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   a=1;
111a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   b=2;
112a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }[B0]
113bb769b257e753aafcbd96767abb2abc645eaa20cBen MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]}") > 0);
114a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B1]") < 0);
115a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockDebug.clearBreakPoint(bp3);
116a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// function g() {
117a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   a=1;
118a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block//   b=2;
119a7e24c173cf37484693b9abb38e494fa7bd7baebSteve Block// }
120a7e24c173cf37484693b9abb38e494fa7bd7baebSteve BlockassertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
121b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch
122b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch
123b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch// Tests for setting break points by script id and position.
124b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochfunction setBreakpointByPosition(f, position)
125b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch{
126b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch  var break_point = Debug.setBreakPointByScriptIdAndPosition(
127b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch      Debug.findScript(f).id,
128b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch      position + Debug.sourcePosition(f),
129b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch      "",
130b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch      true);
131b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch  return break_point.number();
132b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch}
133b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch
134b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp = setBreakpointByPosition(f, 0);
135b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {[B0]a=1;b=2}", Debug.showBreakPoints(f));
136b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp);
137b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {a=1;b=2}", Debug.showBreakPoints(f));
138b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp1 = setBreakpointByPosition(f, 8);
139b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {a=1;[B0]b=2}", Debug.showBreakPoints(f));
140b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp2 = setBreakpointByPosition(f, 4);
141b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {[B0]a=1;[B1]b=2}", Debug.showBreakPoints(f));
142b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp3 = setBreakpointByPosition(f, 11);
143b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {[B0]a=1;[B1]b=2[B2]}", Debug.showBreakPoints(f));
144b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp1);
145b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {[B0]a=1;b=2[B1]}", Debug.showBreakPoints(f));
146b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp2);
147b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {a=1;b=2[B0]}", Debug.showBreakPoints(f));
148b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp3);
149b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertEquals("() {a=1;b=2}", Debug.showBreakPoints(f));
150b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch
151b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp = setBreakpointByPosition(g, 0);
152b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
153b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B0]a=1;
154b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//b=2;
155b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}
156b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
157b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp);
158b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
159b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//a=1;
160b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//b=2;
161b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}
162b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
163b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch
164b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//Second test set and clear breakpoints on lines 1, 2 and 3 (column = 0).
165b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp1 = setBreakpointByPosition(g, 12);
166b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
167b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//a=1;
168b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B0]b=2;
169b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}
170b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]b=2;") > 0);
171b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp2 = setBreakpointByPosition(g, 5);
172b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
173b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B0]a=1;
174b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B1]b=2;
175b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}
176b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
177b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B1]b=2;") > 0);
178b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdochbp3 = setBreakpointByPosition(g, 19);
179b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
180b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B0]a=1;
181b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B1]b=2;
182b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}[B2]
183b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
184b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B1]b=2;") > 0);
185b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B2]}") > 0);
186b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp1);
187b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
188b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//[B0]a=1;
189b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//b=2;
190b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}[B1]
191b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]a=1;") > 0);
192b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B1]}") > 0);
193b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B2]") < 0);
194b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp2);
195b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
196b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//a=1;
197b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//b=2;
198b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}[B0]
199b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]}") > 0);
200b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B1]") < 0);
201b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochDebug.clearBreakPoint(bp3);
202b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//function g() {
203b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//a=1;
204b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//b=2;
205b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben Murdoch//}
206b8e0da25ee8efac3bb05cd6b2730aafbd96119f4Ben MurdochassertTrue(Debug.showBreakPoints(g).indexOf("[B0]") < 0);
207