Skip to content

Commit 00e253a

Browse files
committed
Add test cases for variable statements with destructuring breakpoint validation
1 parent 834aa95 commit 00e253a

10 files changed

Lines changed: 980 additions & 0 deletions
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
2+
1 >interface Robot {
3+
4+
~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined
5+
--------------------------------
6+
2 > name: string;
7+
8+
~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined
9+
--------------------------------
10+
3 > skill: string;
11+
12+
~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined
13+
--------------------------------
14+
4 >}
15+
16+
~~ => Pos: (55 to 56) SpanInfo: undefined
17+
--------------------------------
18+
5 >declare var console: {
19+
20+
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined
21+
--------------------------------
22+
6 > log(msg: string): void;
23+
24+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined
25+
--------------------------------
26+
7 >}
27+
28+
~~ => Pos: (108 to 109) SpanInfo: undefined
29+
--------------------------------
30+
8 >var hello = "hello";
31+
32+
~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19}
33+
>var hello = "hello"
34+
>:=> (line 8, col 0) to (line 8, col 19)
35+
--------------------------------
36+
9 >var robotA: Robot = { name: "mower", skill: "mowing" };
37+
38+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54}
39+
>var robotA: Robot = { name: "mower", skill: "mowing" }
40+
>:=> (line 9, col 0) to (line 9, col 54)
41+
--------------------------------
42+
10 >var robotB: Robot = { name: "trimmer", skill: "trimming" };
43+
44+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58}
45+
>var robotB: Robot = { name: "trimmer", skill: "trimming" }
46+
>:=> (line 10, col 0) to (line 10, col 58)
47+
--------------------------------
48+
11 >var { name: nameA } = robotA;
49+
50+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (247 to 276) SpanInfo: {"start":247,"length":28}
51+
>var { name: nameA } = robotA
52+
>:=> (line 11, col 0) to (line 11, col 28)
53+
--------------------------------
54+
12 >var { name: nameB, skill: skillB } = robotB;
55+
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (277 to 321) SpanInfo: {"start":277,"length":43}
57+
>var { name: nameB, skill: skillB } = robotB
58+
>:=> (line 12, col 0) to (line 12, col 43)
59+
--------------------------------
60+
13 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
61+
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (322 to 401) SpanInfo: {"start":322,"length":78}
63+
>var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }
64+
>:=> (line 13, col 0) to (line 13, col 78)
65+
--------------------------------
66+
14 >if (nameA == nameB) {
67+
68+
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (402 to 423) SpanInfo: {"start":402,"length":19}
69+
>if (nameA == nameB)
70+
>:=> (line 14, col 0) to (line 14, col 19)
71+
--------------------------------
72+
15 > console.log(skillB);
73+
74+
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (424 to 448) SpanInfo: {"start":428,"length":19}
75+
>console.log(skillB)
76+
>:=> (line 15, col 4) to (line 15, col 23)
77+
--------------------------------
78+
16 >}
79+
80+
~~ => Pos: (449 to 450) SpanInfo: {"start":428,"length":19}
81+
>console.log(skillB)
82+
>:=> (line 15, col 4) to (line 15, col 23)
83+
--------------------------------
84+
17 >else {
85+
86+
~~~~~~~ => Pos: (451 to 457) SpanInfo: {"start":462,"length":18}
87+
>console.log(nameC)
88+
>:=> (line 18, col 4) to (line 18, col 22)
89+
--------------------------------
90+
18 > console.log(nameC);
91+
92+
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (458 to 481) SpanInfo: {"start":462,"length":18}
93+
>console.log(nameC)
94+
>:=> (line 18, col 4) to (line 18, col 22)
95+
--------------------------------
96+
19 >}
97+
~ => Pos: (482 to 482) SpanInfo: {"start":462,"length":18}
98+
>console.log(nameC)
99+
>:=> (line 18, col 4) to (line 18, col 22)
Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
2+
1 >interface Robot {
3+
4+
~~~~~~~~~~~~~~~~~~ => Pos: (0 to 17) SpanInfo: undefined
5+
--------------------------------
6+
2 > name: string;
7+
8+
~~~~~~~~~~~~~~~~~~ => Pos: (18 to 35) SpanInfo: undefined
9+
--------------------------------
10+
3 > skill: string;
11+
12+
~~~~~~~~~~~~~~~~~~~ => Pos: (36 to 54) SpanInfo: undefined
13+
--------------------------------
14+
4 >}
15+
16+
~~ => Pos: (55 to 56) SpanInfo: undefined
17+
--------------------------------
18+
5 >declare var console: {
19+
20+
~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (57 to 79) SpanInfo: undefined
21+
--------------------------------
22+
6 > log(msg: string): void;
23+
24+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (80 to 107) SpanInfo: undefined
25+
--------------------------------
26+
7 >}
27+
28+
~~ => Pos: (108 to 109) SpanInfo: undefined
29+
--------------------------------
30+
8 >var hello = "hello";
31+
32+
~~~~~~~~~~~~~~~~~~~~~ => Pos: (110 to 130) SpanInfo: {"start":110,"length":19}
33+
>var hello = "hello"
34+
>:=> (line 8, col 0) to (line 8, col 19)
35+
--------------------------------
36+
9 >var robotA: Robot = { name: "mower", skill: "mowing" };
37+
38+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (131 to 186) SpanInfo: {"start":131,"length":54}
39+
>var robotA: Robot = { name: "mower", skill: "mowing" }
40+
>:=> (line 9, col 0) to (line 9, col 54)
41+
--------------------------------
42+
10 >var robotB: Robot = { name: "trimmer", skill: "trimming" };
43+
44+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (187 to 246) SpanInfo: {"start":187,"length":58}
45+
>var robotB: Robot = { name: "trimmer", skill: "trimming" }
46+
>:=> (line 10, col 0) to (line 10, col 58)
47+
--------------------------------
48+
11 >var a: string, { name: nameA } = robotA;
49+
50+
~~~~~~~~~~~~~~ => Pos: (247 to 260) SpanInfo: undefined
51+
11 >var a: string, { name: nameA } = robotA;
52+
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (261 to 287) SpanInfo: {"start":262,"length":24}
54+
>{ name: nameA } = robotA
55+
>:=> (line 11, col 15) to (line 11, col 39)
56+
--------------------------------
57+
12 >var b: string, { name: nameB, skill: skillB } = robotB;
58+
59+
~~~~~~~~~~~~~~ => Pos: (288 to 301) SpanInfo: undefined
60+
12 >var b: string, { name: nameB, skill: skillB } = robotB;
61+
62+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (302 to 343) SpanInfo: {"start":303,"length":39}
63+
>{ name: nameB, skill: skillB } = robotB
64+
>:=> (line 12, col 15) to (line 12, col 54)
65+
--------------------------------
66+
13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
67+
68+
~~~~~~~~~~~~~~ => Pos: (344 to 357) SpanInfo: undefined
69+
13 >var c: string, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" };
70+
71+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (358 to 434) SpanInfo: {"start":359,"length":74}
72+
>{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }
73+
>:=> (line 13, col 15) to (line 13, col 89)
74+
--------------------------------
75+
14 >
76+
77+
~ => Pos: (435 to 435) SpanInfo: undefined
78+
--------------------------------
79+
15 >var { name: nameA } = robotA, a = hello;
80+
81+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (436 to 464) SpanInfo: {"start":436,"length":28}
82+
>var { name: nameA } = robotA
83+
>:=> (line 15, col 0) to (line 15, col 28)
84+
15 >var { name: nameA } = robotA, a = hello;
85+
86+
~~~~~~~~~~~~ => Pos: (465 to 476) SpanInfo: {"start":466,"length":9}
87+
>a = hello
88+
>:=> (line 15, col 30) to (line 15, col 39)
89+
--------------------------------
90+
16 >var { name: nameB, skill: skillB } = robotB, b = " hello";
91+
92+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (477 to 520) SpanInfo: {"start":477,"length":43}
93+
>var { name: nameB, skill: skillB } = robotB
94+
>:=> (line 16, col 0) to (line 16, col 43)
95+
16 >var { name: nameB, skill: skillB } = robotB, b = " hello";
96+
97+
~~~~~~~~~~~~~~~=> Pos: (521 to 535) SpanInfo: {"start":522,"length":12}
98+
>b = " hello"
99+
>:=> (line 16, col 45) to (line 16, col 57)
100+
--------------------------------
101+
17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello;
102+
103+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (536 to 614) SpanInfo: {"start":536,"length":78}
104+
>var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }
105+
>:=> (line 17, col 0) to (line 17, col 78)
106+
17 >var { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c = hello;
107+
108+
~~~~~~~~~~~~=> Pos: (615 to 626) SpanInfo: {"start":616,"length":9}
109+
>c = hello
110+
>:=> (line 17, col 80) to (line 17, col 89)
111+
--------------------------------
112+
18 >
113+
114+
~ => Pos: (627 to 627) SpanInfo: undefined
115+
--------------------------------
116+
19 >var a = hello, { name: nameA } = robotA, a1= "hello";
117+
118+
~~~~~~~~~~~~~~ => Pos: (628 to 641) SpanInfo: {"start":628,"length":13}
119+
>var a = hello
120+
>:=> (line 19, col 0) to (line 19, col 13)
121+
19 >var a = hello, { name: nameA } = robotA, a1= "hello";
122+
123+
~~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (642 to 667) SpanInfo: {"start":643,"length":24}
124+
>{ name: nameA } = robotA
125+
>:=> (line 19, col 15) to (line 19, col 39)
126+
19 >var a = hello, { name: nameA } = robotA, a1= "hello";
127+
128+
~~~~~~~~~~~~~~=> Pos: (668 to 681) SpanInfo: {"start":669,"length":11}
129+
>a1= "hello"
130+
>:=> (line 19, col 41) to (line 19, col 52)
131+
--------------------------------
132+
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
133+
134+
~~~~~~~~~~~~~~ => Pos: (682 to 695) SpanInfo: {"start":682,"length":13}
135+
>var b = hello
136+
>:=> (line 20, col 0) to (line 20, col 13)
137+
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
138+
139+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (696 to 736) SpanInfo: {"start":697,"length":39}
140+
>{ name: nameB, skill: skillB } = robotB
141+
>:=> (line 20, col 15) to (line 20, col 54)
142+
20 >var b = hello, { name: nameB, skill: skillB } = robotB, b1 = "hello";
143+
144+
~~~~~~~~~~~~~~~=> Pos: (737 to 751) SpanInfo: {"start":738,"length":12}
145+
>b1 = "hello"
146+
>:=> (line 20, col 56) to (line 20, col 68)
147+
--------------------------------
148+
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
149+
150+
~~~~~~~~~~~~~~ => Pos: (752 to 765) SpanInfo: {"start":752,"length":13}
151+
>var c = hello
152+
>:=> (line 21, col 0) to (line 21, col 13)
153+
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
154+
155+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~=> Pos: (766 to 841) SpanInfo: {"start":767,"length":74}
156+
>{ name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }
157+
>:=> (line 21, col 15) to (line 21, col 89)
158+
21 >var c = hello, { name: nameC, skill: skillC } = { name: "Edger", skill: "cutting edges" }, c1 = hello;
159+
160+
~~~~~~~~~~~~~=> Pos: (842 to 854) SpanInfo: {"start":843,"length":10}
161+
>c1 = hello
162+
>:=> (line 21, col 91) to (line 21, col 101)
163+
--------------------------------
164+
22 >if (nameA == nameB) {
165+
166+
~~~~~~~~~~~~~~~~~~~~~~ => Pos: (855 to 876) SpanInfo: {"start":855,"length":19}
167+
>if (nameA == nameB)
168+
>:=> (line 22, col 0) to (line 22, col 19)
169+
--------------------------------
170+
23 > console.log(skillB);
171+
172+
~~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (877 to 901) SpanInfo: {"start":881,"length":19}
173+
>console.log(skillB)
174+
>:=> (line 23, col 4) to (line 23, col 23)
175+
--------------------------------
176+
24 >}
177+
178+
~~ => Pos: (902 to 903) SpanInfo: {"start":881,"length":19}
179+
>console.log(skillB)
180+
>:=> (line 23, col 4) to (line 23, col 23)
181+
--------------------------------
182+
25 >else {
183+
184+
~~~~~~~ => Pos: (904 to 910) SpanInfo: {"start":915,"length":18}
185+
>console.log(nameC)
186+
>:=> (line 26, col 4) to (line 26, col 22)
187+
--------------------------------
188+
26 > console.log(nameC);
189+
190+
~~~~~~~~~~~~~~~~~~~~~~~~ => Pos: (911 to 934) SpanInfo: {"start":915,"length":18}
191+
>console.log(nameC)
192+
>:=> (line 26, col 4) to (line 26, col 22)
193+
--------------------------------
194+
27 >}
195+
~ => Pos: (935 to 935) SpanInfo: {"start":915,"length":18}
196+
>console.log(nameC)
197+
>:=> (line 26, col 4) to (line 26, col 22)

0 commit comments

Comments
 (0)