Implement not.greaterThan for completion list
This commit is contained in:
parent
b1c8303300
commit
1e708b46a7
2 changed files with 11 additions and 4 deletions
|
@ -588,14 +588,21 @@ namespace FourSlash {
|
|||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number) {
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean) {
|
||||
this.taoInvalidReason = "verifyCompletionListItemsCountIsGreaterThan NYI";
|
||||
|
||||
let completions = this.getCompletionListAtCaret();
|
||||
let itemsCount = completions.entries.length;
|
||||
|
||||
if (itemsCount <= count) {
|
||||
this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`);
|
||||
if (negative) {
|
||||
if (itemsCount > count) {
|
||||
this.raiseError(`Expected completion list items count to not be greater than ${count}, but is actually ${itemsCount}`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (itemsCount <= count) {
|
||||
this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -205,7 +205,7 @@ module FourSlashInterface {
|
|||
// Verifies the completion list items count to be greater than the specified amount. The
|
||||
// completion list is brought up if necessary
|
||||
public completionListItemsCountIsGreaterThan(count: number) {
|
||||
FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count);
|
||||
FourSlash.currentTestState.verifyCompletionListItemsCountIsGreaterThan(count, this.negative);
|
||||
}
|
||||
|
||||
public completionListIsEmpty() {
|
||||
|
|
Loading…
Reference in a new issue