Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -2052,7 +2052,7 @@ suite('Editor Controller - Regression tests', () => {
getInitialState: () => NULL_STATE,
tokenize: undefined!,
tokenize2: (line: string, state: IState): TokenizationResult2 => {
return new TokenizationResult2(null!, state);
return new TokenizationResult2(new Uint32Array(0), state);
}
};

View File

@@ -18,7 +18,8 @@ export function testCommand(
selection: Selection,
commandFactory: (selection: Selection) => editorCommon.ICommand,
expectedLines: string[],
expectedSelection: Selection
expectedSelection: Selection,
forceTokenization?: boolean
): void {
let model = TextModel.createFromString(lines.join('\n'), undefined, languageIdentifier);
withTestCodeEditor('', { model: model }, (_editor, cursor) => {
@@ -26,6 +27,10 @@ export function testCommand(
return;
}
if (forceTokenization) {
model.forceTokenization(model.getLineCount());
}
cursor.setSelections('tests', [selection]);
cursor.trigger('tests', editorCommon.Handler.ExecuteCommand, commandFactory(cursor.getSelection()));