mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-09 02:30:15 -06:00
Update tests
This commit is contained in:
parent
af65e86aaa
commit
b00fa42dea
@ -0,0 +1,24 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: file1.ts
|
||||
//// class Foo {
|
||||
//// constructor(private /*0*/privateParam: number,
|
||||
//// public /*1*/publicParam: string,
|
||||
//// protected /*2*/protectedParam: boolean) {
|
||||
////
|
||||
//// let localPrivate = /*3*/privateParam;
|
||||
//// this./*4*/privateParam += 10;
|
||||
////
|
||||
//// let localPublic = /*5*/publicParam;
|
||||
//// this./*6*/publicParam += " Hello!";
|
||||
////
|
||||
//// let localProtected = /*7*/protectedParam;
|
||||
//// this./*8*/protectedParam = false;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let markers = test.markers()
|
||||
for (let marker of markers) {
|
||||
goTo.position(marker.position);
|
||||
verify.documentHighlightsAtPositionCount(3, ["file1.ts"]);
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(private |privateParam|: number) {
|
||||
//// let localPrivate = |privateParam|;
|
||||
//// this.|privateParam| += 10;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let ranges = test.ranges();
|
||||
for (let range of ranges) {
|
||||
goTo.position(range.start);
|
||||
|
||||
verify.referencesCountIs(ranges.length);
|
||||
for (let expectedRange of ranges) {
|
||||
verify.referencesAtPositionContains(expectedRange);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(public |publicParam|: number) {
|
||||
//// let localPublic = |publicParam|;
|
||||
//// this.|publicParam| += 10;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let ranges = test.ranges();
|
||||
for (let range of ranges) {
|
||||
goTo.position(range.start);
|
||||
|
||||
verify.referencesCountIs(ranges.length);
|
||||
for (let expectedRange of ranges) {
|
||||
verify.referencesAtPositionContains(expectedRange);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(protected |protectedParam|: number) {
|
||||
//// let localProtected = |protectedParam|;
|
||||
//// this.|protectedParam| += 10;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let ranges = test.ranges();
|
||||
for (let range of ranges) {
|
||||
goTo.position(range.start);
|
||||
|
||||
verify.referencesCountIs(ranges.length);
|
||||
for (let expectedRange of ranges) {
|
||||
verify.referencesAtPositionContains(expectedRange);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
// @Filename: file1.ts
|
||||
//// class Foo {
|
||||
//// constructor(private /*0*/privateParam: number,
|
||||
//// public /*1*/publicParam: string,
|
||||
//// protected /*2*/protectedParam: boolean) {
|
||||
////
|
||||
//// let localPrivate = /*3*/privateParam;
|
||||
//// this./*4*/privateParam += 10;
|
||||
////
|
||||
//// let localPublic = /*5*/publicParam;
|
||||
//// this./*6*/publicParam += " Hello!";
|
||||
////
|
||||
//// let localProtected = /*7*/protectedParam;
|
||||
//// this./*8*/protectedParam = false;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let markers = test.markers()
|
||||
for (let marker of markers) {
|
||||
goTo.position(marker.position);
|
||||
verify.referencesCountIs(3);
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(private privateParam: number,
|
||||
//// public publicParam: string,
|
||||
//// protected protectedParam: boolean) {
|
||||
////
|
||||
//// let localPrivate = privateParam;
|
||||
//// this.privateParam += 10;
|
||||
////
|
||||
//// let localPublic = publicParam;
|
||||
//// this.publicParam += " Hello!";
|
||||
////
|
||||
//// let localProtected = protectedParam;
|
||||
//// this.protectedParam = !this.protectedParam;
|
||||
//// }
|
||||
//// }
|
||||
14
tests/cases/fourslash/renameParameterPropeterDeclaration1.ts
Normal file
14
tests/cases/fourslash/renameParameterPropeterDeclaration1.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(private |privateParam|: number) {
|
||||
//// let localPrivate = |privateParam|;
|
||||
//// this.|privateParam| += 10;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let ranges = test.ranges()
|
||||
for (let range of ranges) {
|
||||
goTo.position(range.start);
|
||||
verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false);
|
||||
}
|
||||
14
tests/cases/fourslash/renameParameterPropeterDeclaration2.ts
Normal file
14
tests/cases/fourslash/renameParameterPropeterDeclaration2.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(public |publicParam|: number) {
|
||||
//// let publicParam = |publicParam|;
|
||||
//// this.|publicParam| += 10;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let ranges = test.ranges()
|
||||
for (let range of ranges) {
|
||||
goTo.position(range.start);
|
||||
verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false);
|
||||
}
|
||||
14
tests/cases/fourslash/renameParameterPropeterDeclaration3.ts
Normal file
14
tests/cases/fourslash/renameParameterPropeterDeclaration3.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/// <reference path='fourslash.ts'/>
|
||||
|
||||
//// class Foo {
|
||||
//// constructor(protected |protectedParam|: number) {
|
||||
//// let protectedParam = |protectedParam|;
|
||||
//// this.|protectedParam| += 10;
|
||||
//// }
|
||||
//// }
|
||||
|
||||
let ranges = test.ranges()
|
||||
for (let range of ranges) {
|
||||
goTo.position(range.start);
|
||||
verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false);
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user