Skip to content

Commit d7e6fba

Browse files
author
Arthur Ozga
committed
fixed some warts
1 parent b244d0d commit d7e6fba

File tree

2 files changed

+8
-30
lines changed

2 files changed

+8
-30
lines changed

src/harness/fourslash.ts

+5-8
Original file line numberDiff line numberDiff line change
@@ -1875,7 +1875,7 @@ module FourSlash {
18751875
}
18761876
}
18771877

1878-
private verifyProjectInfo(expected: string[]) {
1878+
public verifyProjectInfo(expected: string[]) {
18791879
if (this.testType === FourSlashTestType.Server) {
18801880
let actual = (<ts.server.SessionClient>this.languageService).getProjectInfo(
18811881
this.activeFile.fileName,
@@ -2057,11 +2057,8 @@ module FourSlash {
20572057
return result;
20582058
}
20592059

2060-
public verifGetScriptLexicalStructureListContains(
2061-
name: string,
2062-
kind: string,
2063-
markerPosition?: number) {
2064-
this.taoInvalidReason = 'verifGetScriptLexicalStructureListContains impossible';
2060+
public verifyGetScriptLexicalStructureListContains(name: string, kind: string) {
2061+
this.taoInvalidReason = 'verifyGetScriptLexicalStructureListContains impossible';
20652062

20662063
let items = this.languageService.getNavigationBarItems(this.activeFile.fileName);
20672064

@@ -2263,7 +2260,7 @@ module FourSlash {
22632260
return 'line ' + (pos.line + 1) + ', col ' + pos.character;
22642261
}
22652262

2266-
private getMarkerByName(markerName: string) {
2263+
public getMarkerByName(markerName: string) {
22672264
let markerPos = this.testData.markerPositions[markerName];
22682265
if (markerPos === undefined) {
22692266
let markerNames: string[] = [];
@@ -2738,4 +2735,4 @@ module FourSlash {
27382735
fileName: fileName
27392736
};
27402737
}
2741-
}
2738+
}

tests/cases/fourslash/fourslash.ts

+3-22
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="../../../src/harness/fourslashRunner.ts"/>
1+
/// <reference path="../../../src/harness/fourslash.ts"/>
22

33
// declare var FourSlash;
44
// module ts {
@@ -60,7 +60,6 @@ enum EmitReturnStatus {
6060
}
6161

6262
module FourSlashInterface {
63-
declare var FourSlash;
6463

6564
export interface Marker {
6665
fileName: string;
@@ -219,15 +218,6 @@ module FourSlashInterface {
219218
FourSlash.currentTestState.verifyReferencesAtPositionListContains(range.fileName, range.start, range.end, isWriteAccess);
220219
}
221220

222-
public implementorsCountIs(count: number) {
223-
FourSlash.currentTestState.verifyImplementorsCountIs(count);
224-
}
225-
226-
// Add tests for this.
227-
public currentParameterIsVariable() {
228-
FourSlash.currentTestState.verifyCurrentParameterIsVariable(!this.negative);
229-
}
230-
231221
public signatureHelpPresent() {
232222
FourSlash.currentTestState.verifySignatureHelpPresent(!this.negative);
233223
}
@@ -379,28 +369,19 @@ module FourSlashInterface {
379369
FourSlash.currentTestState.verifyNoMatchingBracePosition(bracePosition);
380370
}
381371

382-
public setVerifyDocComments(val: boolean) {
383-
FourSlash.currentTestState.setVerifyDocComments(val);
384-
}
385-
386372
public getScriptLexicalStructureListCount(count: number) {
387373
FourSlash.currentTestState.verifyGetScriptLexicalStructureListCount(count);
388374
}
389375

376+
// TODO: figure out what to do with the unused arguments.
390377
public getScriptLexicalStructureListContains(
391378
name: string,
392379
kind: string,
393380
fileName?: string,
394381
parentName?: string,
395382
isAdditionalSpan?: boolean,
396383
markerPosition?: number) {
397-
FourSlash.currentTestState.verifGetScriptLexicalStructureListContains(
398-
name,
399-
kind,
400-
fileName,
401-
parentName,
402-
isAdditionalSpan,
403-
markerPosition);
384+
FourSlash.currentTestState.verifyGetScriptLexicalStructureListContains(name, kind);
404385
}
405386

406387
public navigationItemsListCount(count: number, searchValue: string, matchKind?: string) {

0 commit comments

Comments
 (0)