Skip to content

Commit 8ab4df0

Browse files
Added tests.
1 parent 1f77198 commit 8ab4df0

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////t /*1*/ry {
4+
//// t/*2*/ry {
5+
//// }
6+
//// ctch (x) {
7+
//// }
8+
////
9+
//// tr {
10+
//// }
11+
//// fin/*3*/ally {
12+
//// }
13+
////}
14+
////c/*4*/atch (e) {
15+
////}
16+
////f/*5*/inally {
17+
////}
18+
////
19+
////// Missing catch variable
20+
////t/*6*/ry {
21+
////}
22+
////catc/*7*/h {
23+
////}
24+
/////*8*/finally {
25+
////}
26+
////
27+
////// Missing try entirely
28+
////cat/*9*/ch (x) {
29+
////}
30+
////final/*10*/ly {
31+
////}
32+
33+
34+
for (var i = 1; i <= test.markers().length; i++) {
35+
goTo.marker("" + i);
36+
37+
switch (i) {
38+
case 1:
39+
case 2:
40+
case 3:
41+
verify.occurrencesAtPositionCount(1);
42+
break;
43+
case 4:
44+
case 5:
45+
case 9:
46+
case 10:
47+
verify.occurrencesAtPositionCount(2);
48+
break;
49+
case 6:
50+
case 7:
51+
case 8:
52+
verify.occurrencesAtPositionCount(3);
53+
break;
54+
}
55+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/// <reference path='fourslash.ts' />
2+
3+
////try/*1*/ {
4+
//// try/*2*/ {
5+
//// }
6+
//// catch/*3*/ (x) {
7+
//// }
8+
////
9+
//// try/*4*/ {
10+
//// }
11+
//// finally/*5*/ {/*8*/
12+
//// }
13+
////}
14+
////catch/*6*/ (e) {
15+
////}
16+
////finally/*7*/ {
17+
////}
18+
19+
20+
for (var i = 1; i <= test.markers().length; i++) {
21+
goTo.marker("" + i);
22+
verify.occurrencesAtPositionCount(0);
23+
}

0 commit comments

Comments
 (0)