mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-15 10:58:31 -05:00
Merge from master
This commit is contained in:
@@ -3,13 +3,11 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { PieceTreeTextBuffer, IValidatedEditOperation } from 'vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer';
|
||||
import { createTextBufferFactory } from 'vs/editor/common/model/textModel';
|
||||
import { DefaultEndOfLine } from 'vs/editor/common/model';
|
||||
import { IValidatedEditOperation, PieceTreeTextBuffer } from 'vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer';
|
||||
import { createTextBufferFactory } from 'vs/editor/common/model/textModel';
|
||||
|
||||
suite('PieceTreeTextBuffer._getInverseEdits', () => {
|
||||
|
||||
|
||||
@@ -2,13 +2,12 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import * as assert from 'assert';
|
||||
import { DefaultEndOfLine } from 'vs/editor/common/model';
|
||||
import { createTextBufferFactory } from 'vs/editor/common/model/textModel';
|
||||
import * as strings from 'vs/base/common/strings';
|
||||
import { DefaultEndOfLine } from 'vs/editor/common/model';
|
||||
import { PieceTreeTextBuffer } from 'vs/editor/common/model/pieceTreeTextBuffer/pieceTreeTextBuffer';
|
||||
import { createTextBufferFactory } from 'vs/editor/common/model/textModel';
|
||||
|
||||
export function testTextBufferFactory(text: string, eol: string, mightContainNonBasicASCII: boolean, mightContainRTL: boolean): void {
|
||||
const textBuffer = <PieceTreeTextBuffer>createTextBufferFactory(text).create(DefaultEndOfLine.LF);
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
'use strict';
|
||||
|
||||
import { CharCode } from 'vs/base/common/charCode';
|
||||
import { IIdentifiedSingleEditOperation, DefaultEndOfLine, ITextBufferBuilder, ITextBuffer } from 'vs/editor/common/model';
|
||||
import { Range } from 'vs/editor/common/core/range';
|
||||
import { DefaultEndOfLine, IIdentifiedSingleEditOperation, ITextBuffer, ITextBufferBuilder } from 'vs/editor/common/model';
|
||||
|
||||
export function getRandomInt(min: number, max: number): number {
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
@@ -33,7 +32,7 @@ export function getRandomString(minLength: number, maxLength: number): string {
|
||||
}
|
||||
|
||||
export function generateRandomEdits(chunks: string[], editCnt: number): IIdentifiedSingleEditOperation[] {
|
||||
let lines = [];
|
||||
let lines: string[] = [];
|
||||
for (let i = 0; i < chunks.length; i++) {
|
||||
let newLines = chunks[i].split(/\r\n|\r|\n/);
|
||||
if (lines.length === 0) {
|
||||
@@ -66,7 +65,7 @@ export function generateRandomEdits(chunks: string[], editCnt: number): IIdentif
|
||||
}
|
||||
|
||||
export function generateSequentialInserts(chunks: string[], editCnt: number): IIdentifiedSingleEditOperation[] {
|
||||
let lines = [];
|
||||
let lines: string[] = [];
|
||||
for (let i = 0; i < chunks.length; i++) {
|
||||
let newLines = chunks[i].split(/\r\n|\r|\n/);
|
||||
if (lines.length === 0) {
|
||||
@@ -101,7 +100,7 @@ export function generateSequentialInserts(chunks: string[], editCnt: number): II
|
||||
}
|
||||
|
||||
export function generateRandomReplaces(chunks: string[], editCnt: number, searchStringLen: number, replaceStringLen: number): IIdentifiedSingleEditOperation[] {
|
||||
let lines = [];
|
||||
let lines: string[] = [];
|
||||
for (let i = 0; i < chunks.length; i++) {
|
||||
let newLines = chunks[i].split(/\r\n|\r|\n/);
|
||||
if (lines.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user