Skip to content

Commit 7146b48

Browse files
committed
Test cases for breakpoints in assingment statement with destructuring
1 parent 681e354 commit 7146b48

4 files changed

Lines changed: 648 additions & 0 deletions
Lines changed: 275 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
2+
1 >declare var console: {
3+
4+
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (0 to 22) SpanInfo: undefined
5+
--------------------------------
6+
2 > log(msg: any): void;
7+
8+
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (23 to 47) SpanInfo: undefined
9+
--------------------------------
10+
3 >}
11+
12+
~~ => Pos: (48 to 49) SpanInfo: undefined
13+
--------------------------------
14+
4 >type Robot = [number, string, string];
15+
16+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (50 to 88) SpanInfo: undefined
17+
--------------------------------
18+
5 >type MultiSkilledRobot = [string, [string, string]];
19+
20+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (89 to 141) SpanInfo: undefined
21+
--------------------------------
22+
6 >
23+
24+
~ => Pos: (142 to 142) SpanInfo: undefined
25+
--------------------------------
26+
7 >var robotA: Robot = [1, "mower", "mowing"];
27+
28+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (143 to 186) SpanInfo: {"start":143,"length":42}
29+
>var robotA: Robot = [1, "mower", "mowing"]
30+
>:=> (line 7, col 0) to (line 7, col 42)
31+
--------------------------------
32+
8 >var robotB: Robot = [2, "trimmer", "trimming"];
33+
34+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 234) SpanInfo: {"start":187,"length":46}
35+
>var robotB: Robot = [2, "trimmer", "trimming"]
36+
>:=> (line 8, col 0) to (line 8, col 46)
37+
--------------------------------
38+
9 >var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]];
39+
40+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (235 to 298) SpanInfo: {"start":235,"length":62}
41+
>var multiRobotA: MultiSkilledRobot = ["mower", ["mowing", ""]]
42+
>:=> (line 9, col 0) to (line 9, col 62)
43+
--------------------------------
44+
10 >var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]];
45+
46+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (299 to 372) SpanInfo: {"start":299,"length":72}
47+
>var multiRobotB: MultiSkilledRobot = ["trimmer", ["trimming", "edging"]]
48+
>:=> (line 10, col 0) to (line 10, col 72)
49+
--------------------------------
50+
11 >
51+
52+
~ => Pos: (373 to 373) SpanInfo: undefined
53+
--------------------------------
54+
12 >let nameA: string, numberB: number, nameB: string, skillB: string;
55+
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (374 to 440) SpanInfo: undefined
57+
--------------------------------
58+
13 >let robotAInfo: (number | string)[];
59+
60+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (441 to 477) SpanInfo: undefined
61+
--------------------------------
62+
14 >
63+
64+
~ => Pos: (478 to 478) SpanInfo: undefined
65+
--------------------------------
66+
15 >let multiSkillB: [string, string], nameMB: string, primarySkillB: string, secondarySkillB: string;
67+
68+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (479 to 577) SpanInfo: undefined
69+
--------------------------------
70+
16 >let multiRobotAInfo: (string | [string, string])[];
71+
72+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (578 to 629) SpanInfo: undefined
73+
--------------------------------
74+
17 >
75+
76+
~ => Pos: (630 to 630) SpanInfo: undefined
77+
--------------------------------
78+
18 >[, nameA] = robotA;
79+
80+
~~~~~~~~~~~~~~~~~~~~ => Pos: (631 to 650) SpanInfo: {"start":631,"length":18}
81+
>[, nameA] = robotA
82+
>:=> (line 18, col 0) to (line 18, col 18)
83+
--------------------------------
84+
19 >[, nameB] = getRobotB();
85+
86+
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (651 to 675) SpanInfo: {"start":651,"length":23}
87+
>[, nameB] = getRobotB()
88+
>:=> (line 19, col 0) to (line 19, col 23)
89+
--------------------------------
90+
20 >[, nameB] = [2, "trimmer", "trimming"];
91+
92+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (676 to 715) SpanInfo: {"start":676,"length":38}
93+
>[, nameB] = [2, "trimmer", "trimming"]
94+
>:=> (line 20, col 0) to (line 20, col 38)
95+
--------------------------------
96+
21 >[, multiSkillB] = multiRobotB;
97+
98+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (716 to 746) SpanInfo: {"start":716,"length":29}
99+
>[, multiSkillB] = multiRobotB
100+
>:=> (line 21, col 0) to (line 21, col 29)
101+
--------------------------------
102+
22 >[, multiSkillB] = getMultiRobotB();
103+
104+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (747 to 782) SpanInfo: {"start":747,"length":34}
105+
>[, multiSkillB] = getMultiRobotB()
106+
>:=> (line 22, col 0) to (line 22, col 34)
107+
--------------------------------
108+
23 >[, multiSkillB] = ["roomba", ["vaccum", "mopping"]];
109+
110+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (783 to 835) SpanInfo: {"start":783,"length":51}
111+
>[, multiSkillB] = ["roomba", ["vaccum", "mopping"]]
112+
>:=> (line 23, col 0) to (line 23, col 51)
113+
--------------------------------
114+
24 >
115+
116+
~ => Pos: (836 to 836) SpanInfo: undefined
117+
--------------------------------
118+
25 >[numberB] = robotB;
119+
120+
~~~~~~~~~~~~~~~~~~~~ => Pos: (837 to 856) SpanInfo: {"start":837,"length":18}
121+
>[numberB] = robotB
122+
>:=> (line 25, col 0) to (line 25, col 18)
123+
--------------------------------
124+
26 >[numberB] = getRobotB();
125+
126+
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (857 to 881) SpanInfo: {"start":857,"length":23}
127+
>[numberB] = getRobotB()
128+
>:=> (line 26, col 0) to (line 26, col 23)
129+
--------------------------------
130+
27 >[numberB] = [2, "trimmer", "trimming"];
131+
132+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (882 to 921) SpanInfo: {"start":882,"length":38}
133+
>[numberB] = [2, "trimmer", "trimming"]
134+
>:=> (line 27, col 0) to (line 27, col 38)
135+
--------------------------------
136+
28 >[nameMB] = multiRobotB;
137+
138+
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (922 to 945) SpanInfo: {"start":922,"length":22}
139+
>[nameMB] = multiRobotB
140+
>:=> (line 28, col 0) to (line 28, col 22)
141+
--------------------------------
142+
29 >[nameMB] = getMultiRobotB();
143+
144+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (946 to 974) SpanInfo: {"start":946,"length":27}
145+
>[nameMB] = getMultiRobotB()
146+
>:=> (line 29, col 0) to (line 29, col 27)
147+
--------------------------------
148+
30 >[nameMB] = ["trimmer", ["trimming", "edging"]];
149+
150+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (975 to 1022) SpanInfo: {"start":975,"length":46}
151+
>[nameMB] = ["trimmer", ["trimming", "edging"]]
152+
>:=> (line 30, col 0) to (line 30, col 46)
153+
--------------------------------
154+
31 >
155+
156+
~ => Pos: (1023 to 1023) SpanInfo: undefined
157+
--------------------------------
158+
32 >[numberB, nameB, skillB] = robotB;
159+
160+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1024 to 1058) SpanInfo: {"start":1024,"length":33}
161+
>[numberB, nameB, skillB] = robotB
162+
>:=> (line 32, col 0) to (line 32, col 33)
163+
--------------------------------
164+
33 >[numberB, nameB, skillB] = getRobotB();
165+
166+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1059 to 1098) SpanInfo: {"start":1059,"length":38}
167+
>[numberB, nameB, skillB] = getRobotB()
168+
>:=> (line 33, col 0) to (line 33, col 38)
169+
--------------------------------
170+
34 >[numberB, nameB, skillB] = [2, "trimmer", "trimming"];
171+
172+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1099 to 1153) SpanInfo: {"start":1099,"length":53}
173+
>[numberB, nameB, skillB] = [2, "trimmer", "trimming"]
174+
>:=> (line 34, col 0) to (line 34, col 53)
175+
--------------------------------
176+
35 >[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB;
177+
178+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1154 to 1211) SpanInfo: {"start":1154,"length":56}
179+
>[nameMB, [primarySkillB, secondarySkillB]] = multiRobotB
180+
>:=> (line 35, col 0) to (line 35, col 56)
181+
--------------------------------
182+
36 >[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB();
183+
184+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1212 to 1274) SpanInfo: {"start":1212,"length":61}
185+
>[nameMB, [primarySkillB, secondarySkillB]] = getMultiRobotB()
186+
>:=> (line 36, col 0) to (line 36, col 61)
187+
--------------------------------
188+
37 >[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]];
189+
190+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1275 to 1356) SpanInfo: {"start":1275,"length":80}
191+
>[nameMB, [primarySkillB, secondarySkillB]] = ["trimmer", ["trimming", "edging"]]
192+
>:=> (line 37, col 0) to (line 37, col 80)
193+
--------------------------------
194+
38 >
195+
196+
~ => Pos: (1357 to 1357) SpanInfo: undefined
197+
--------------------------------
198+
39 >[numberB, ...robotAInfo] = robotB;
199+
200+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1358 to 1392) SpanInfo: {"start":1358,"length":33}
201+
>[numberB, ...robotAInfo] = robotB
202+
>:=> (line 39, col 0) to (line 39, col 33)
203+
--------------------------------
204+
40 >[numberB, ...robotAInfo] = getRobotB();
205+
206+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1393 to 1432) SpanInfo: {"start":1393,"length":38}
207+
>[numberB, ...robotAInfo] = getRobotB()
208+
>:=> (line 40, col 0) to (line 40, col 38)
209+
--------------------------------
210+
41 >[numberB, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"];
211+
212+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1433 to 1494) SpanInfo: {"start":1433,"length":60}
213+
>[numberB, ...robotAInfo] = <Robot>[2, "trimmer", "trimming"]
214+
>:=> (line 41, col 0) to (line 41, col 60)
215+
--------------------------------
216+
42 >[...multiRobotAInfo] = multiRobotA;
217+
218+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1495 to 1530) SpanInfo: {"start":1495,"length":34}
219+
>[...multiRobotAInfo] = multiRobotA
220+
>:=> (line 42, col 0) to (line 42, col 34)
221+
--------------------------------
222+
43 >[...multiRobotAInfo] = getMultiRobotB();
223+
224+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1531 to 1571) SpanInfo: {"start":1531,"length":39}
225+
>[...multiRobotAInfo] = getMultiRobotB()
226+
>:=> (line 43, col 0) to (line 43, col 39)
227+
--------------------------------
228+
44 >[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]];
229+
230+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (1572 to 1631) SpanInfo: {"start":1572,"length":58}
231+
>[...multiRobotAInfo] = ["trimmer", ["trimming", "edging"]]
232+
>:=> (line 44, col 0) to (line 44, col 58)
233+
--------------------------------
234+
45 >
235+
236+
~ => Pos: (1632 to 1632) SpanInfo: undefined
237+
--------------------------------
238+
46 >function getRobotB() {
239+
240+
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1633 to 1655) SpanInfo: {"start":1660,"length":13}
241+
>return robotB
242+
>:=> (line 47, col 4) to (line 47, col 17)
243+
--------------------------------
244+
47 > return robotB;
245+
246+
~~~~~~~~~~~~~~~~~~~ => Pos: (1656 to 1674) SpanInfo: {"start":1660,"length":13}
247+
>return robotB
248+
>:=> (line 47, col 4) to (line 47, col 17)
249+
--------------------------------
250+
48 >}
251+
252+
~~ => Pos: (1675 to 1676) SpanInfo: {"start":1675,"length":1}
253+
>}
254+
>:=> (line 48, col 0) to (line 48, col 1)
255+
--------------------------------
256+
49 >
257+
258+
~ => Pos: (1677 to 1677) SpanInfo: undefined
259+
--------------------------------
260+
50 >function getMultiRobotB() {
261+
262+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1678 to 1705) SpanInfo: {"start":1710,"length":18}
263+
>return multiRobotB
264+
>:=> (line 51, col 4) to (line 51, col 22)
265+
--------------------------------
266+
51 > return multiRobotB;
267+
268+
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (1706 to 1729) SpanInfo: {"start":1710,"length":18}
269+
>return multiRobotB
270+
>:=> (line 51, col 4) to (line 51, col 22)
271+
--------------------------------
272+
52 >}
273+
~ => Pos: (1730 to 1730) SpanInfo: {"start":1730,"length":1}
274+
>}
275+
>:=> (line 52, col 0) to (line 52, col 1)

0 commit comments

Comments
 (0)