Added tests.

This commit is contained in:
Daniel Rosenwasser 2014-08-26 14:18:09 -07:00
parent 1f77198c4c
commit 8ab4df0e25
2 changed files with 78 additions and 0 deletions

View File

@ -0,0 +1,55 @@
/// <reference path='fourslash.ts' />
////t /*1*/ry {
//// t/*2*/ry {
//// }
//// ctch (x) {
//// }
////
//// tr {
//// }
//// fin/*3*/ally {
//// }
////}
////c/*4*/atch (e) {
////}
////f/*5*/inally {
////}
////
////// Missing catch variable
////t/*6*/ry {
////}
////catc/*7*/h {
////}
/////*8*/finally {
////}
////
////// Missing try entirely
////cat/*9*/ch (x) {
////}
////final/*10*/ly {
////}
for (var i = 1; i <= test.markers().length; i++) {
goTo.marker("" + i);
switch (i) {
case 1:
case 2:
case 3:
verify.occurrencesAtPositionCount(1);
break;
case 4:
case 5:
case 9:
case 10:
verify.occurrencesAtPositionCount(2);
break;
case 6:
case 7:
case 8:
verify.occurrencesAtPositionCount(3);
break;
}
}

View File

@ -0,0 +1,23 @@
/// <reference path='fourslash.ts' />
////try/*1*/ {
//// try/*2*/ {
//// }
//// catch/*3*/ (x) {
//// }
////
//// try/*4*/ {
//// }
//// finally/*5*/ {/*8*/
//// }
////}
////catch/*6*/ (e) {
////}
////finally/*7*/ {
////}
for (var i = 1; i <= test.markers().length; i++) {
goTo.marker("" + i);
verify.occurrencesAtPositionCount(0);
}