Add test for occurrences in ClassExpressions

This commit is contained in:
Dick van den Brink 2015-07-15 00:18:59 +02:00
parent acb9f709e4
commit 46292a2263
4 changed files with 106 additions and 0 deletions

View File

@ -0,0 +1,23 @@
/// <reference path='fourslash.ts' />
////let A = class Foo {
//// [|constructor|]();
//// [|constructor|](x: number);
//// [|constructor|](y: string);
//// [|constructor|](a?: any) {
//// }
////}
////
////let B = class D {
//// constructor(x: number) {
//// }
////}
const ranges = test.ranges();
for (let r of ranges) {
goTo.position(r.start);
for (let range of ranges) {
verify.occurrencesAtPositionContains(range, false);
}
}

View File

@ -0,0 +1,27 @@
/// <reference path='fourslash.ts' />
////let A = class Foo {
//// [|private|] foo;
//// [|private|] private;
//// constructor([|private|] y: string, public x: string) {
//// }
//// [|private|] method() { }
//// public method2() { }
//// [|private|] static static() { }
////}
////
////let B = class D {
//// constructor(private x: number) {
//// }
//// private test() {}
//// public test2() {}
////}
const ranges = test.ranges();
for (let r of ranges) {
goTo.position(r.start);
for (let range of ranges) {
verify.occurrencesAtPositionContains(range, false);
}
}

View File

@ -0,0 +1,27 @@
/// <reference path='fourslash.ts' />
////let A = class Foo {
//// [|public|] foo;
//// [|public|] public;
//// constructor([|public|] y: string, private x: string) {
//// }
//// [|public|] method() { }
//// private method2() {}
//// [|public|] static static() { }
////}
////
////let B = class D {
//// constructor(private x: number) {
//// }
//// private test() {}
//// public test2() {}
////}
const ranges = test.ranges();
for (let r of ranges) {
goTo.position(r.start);
for (let range of ranges) {
verify.occurrencesAtPositionContains(range, false);
}
}

View File

@ -0,0 +1,29 @@
/// <reference path='fourslash.ts' />
////let A = class Foo {
//// public static foo;
//// [|static|] a;
//// constructor(public y: string, private x: string) {
//// }
//// public method() { }
//// private method2() {}
//// public [|static|] static() { }
//// private [|static|] static2() { }
////}
////
////let B = class D {
//// static a;
//// constructor(private x: number) {
//// }
//// private static test() {}
//// public static test2() {}
////}
const ranges = test.ranges();
for (let r of ranges) {
goTo.position(r.start);
for (let range of ranges) {
verify.occurrencesAtPositionContains(range, false);
}
}