Skip to content

Commit

Permalink
Renames (#37834)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdima committed Nov 8, 2017
1 parent ad75f5e commit dc517c0
Show file tree
Hide file tree
Showing 19 changed files with 163 additions and 167 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';

import * as assert from 'assert';
import { withMockCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { Position } from 'vs/editor/common/core/position';
import { Model } from 'vs/editor/common/model/model';
import { LanguageConfigurationRegistry } from 'vs/editor/common/modes/languageConfigurationRegistry';
Expand Down Expand Up @@ -34,7 +34,7 @@ suite('bracket matching', () => {
let mode = new BracketMode();
let model = Model.createFromString('var x = (3 + (5-7)) + ((5+3)+5);', undefined, mode.getLanguageIdentifier());

withMockCodeEditor(null, { model: model }, (editor, cursor) => {
withTestCodeEditor(null, { model: model }, (editor, cursor) => {
let bracketMatchingController = editor.registerAndInstantiateContribution<BracketMatchingController>(BracketMatchingController);

// start on closing bracket
Expand Down Expand Up @@ -66,7 +66,7 @@ suite('bracket matching', () => {
let mode = new BracketMode();
let model = Model.createFromString('var x = (3 + (5-7)); y();', undefined, mode.getLanguageIdentifier());

withMockCodeEditor(null, { model: model }, (editor, cursor) => {
withTestCodeEditor(null, { model: model }, (editor, cursor) => {
let bracketMatchingController = editor.registerAndInstantiateContribution<BracketMatchingController>(BracketMatchingController);

// start position between brackets
Expand Down
8 changes: 4 additions & 4 deletions src/vs/editor/contrib/find/test/find.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import * as assert from 'assert';
import { Position } from 'vs/editor/common/core/position';
import { Range } from 'vs/editor/common/core/range';
import { getSelectionSearchString } from 'vs/editor/contrib/find/common/find';
import { withMockCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';


suite('Find', () => {

test('search string at position', () => {
withMockCodeEditor([
withTestCodeEditor([
'ABC DEF',
'0123 456'
], {}, (editor, cursor) => {
Expand All @@ -37,7 +37,7 @@ suite('Find', () => {
});

test('search string with selection', () => {
withMockCodeEditor([
withTestCodeEditor([
'ABC DEF',
'0123 456'
], {}, (editor, cursor) => {
Expand All @@ -61,7 +61,7 @@ suite('Find', () => {
});

test('search string with multiline selection', () => {
withMockCodeEditor([
withTestCodeEditor([
'ABC DEF',
'0123 456'
], {}, (editor, cursor) => {
Expand Down
32 changes: 16 additions & 16 deletions src/vs/editor/contrib/find/test/findController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Selection } from 'vs/editor/common/core/selection';
import { Range } from 'vs/editor/common/core/range';
import { ICommonCodeEditor } from 'vs/editor/common/editorCommon';
import { CommonFindController, FindStartFocusAction, IFindStartOptions, NextMatchFindAction, StartFindAction } from 'vs/editor/contrib/find/common/findController';
import { withMockCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { HistoryNavigator } from 'vs/base/common/history';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IStorageService } from 'vs/platform/storage/common/storage';
Expand Down Expand Up @@ -78,7 +78,7 @@ suite('FindController', () => {
} as IStorageService);

test('issue #1857: F3, Find Next, acts like "Find Under Cursor"', () => {
withMockCodeEditor([
withTestCodeEditor([
'ABC',
'ABC',
'XYZ',
Expand Down Expand Up @@ -136,7 +136,7 @@ suite('FindController', () => {
});

test('issue #3090: F3 does not loop with two matches on a single line', () => {
withMockCodeEditor([
withTestCodeEditor([
'import nls = require(\'vs/nls\');'
], { serviceCollection: serviceCollection }, (editor, cursor) => {

Expand All @@ -159,7 +159,7 @@ suite('FindController', () => {
});

test('issue #6149: Auto-escape highlighted text for search and replace regex mode', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -185,7 +185,7 @@ suite('FindController', () => {
});

test('issue #9043: Clear search scope when find widget is hidden', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand Down Expand Up @@ -213,7 +213,7 @@ suite('FindController', () => {
});

test('find term is added to history on state change', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -229,7 +229,7 @@ suite('FindController', () => {
});

test('find term is added with delay', (done) => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -249,7 +249,7 @@ suite('FindController', () => {
});

test('show previous find term', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -266,7 +266,7 @@ suite('FindController', () => {
});

test('show previous find term do not update history', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -283,7 +283,7 @@ suite('FindController', () => {
});

test('show next find term', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -303,7 +303,7 @@ suite('FindController', () => {
});

test('show next find term do not update history', () => {
withMockCodeEditor([
withTestCodeEditor([
'var x = (3 * 5)',
'var y = (3 * 5)',
'var z = (3 * 5)',
Expand All @@ -323,7 +323,7 @@ suite('FindController', () => {
});

test('issue #18111: Regex replace with single space replaces with no space', () => {
withMockCodeEditor([
withTestCodeEditor([
'HRESULT OnAmbientPropertyChange(DISPID dispid);'
], { serviceCollection: serviceCollection }, (editor, cursor) => {

Expand All @@ -348,7 +348,7 @@ suite('FindController', () => {
});

test('issue #24714: Regular expression with ^ in search & replace', () => {
withMockCodeEditor([
withTestCodeEditor([
'',
'line2',
'line3'
Expand Down Expand Up @@ -399,7 +399,7 @@ suite('FindController query options persistence', () => {
} as IStorageService);

test('matchCase', () => {
withMockCodeEditor([
withTestCodeEditor([
'abc',
'ABC',
'XYZ',
Expand All @@ -426,7 +426,7 @@ suite('FindController query options persistence', () => {
queryState = { 'editor.isRegex': false, 'editor.matchCase': false, 'editor.wholeWord': true };

test('wholeWord', () => {
withMockCodeEditor([
withTestCodeEditor([
'ABC',
'AB',
'XYZ',
Expand All @@ -451,7 +451,7 @@ suite('FindController query options persistence', () => {
});

test('toggling options is saved', () => {
withMockCodeEditor([
withTestCodeEditor([
'ABC',
'AB',
'XYZ',
Expand Down
4 changes: 2 additions & 2 deletions src/vs/editor/contrib/find/test/findModel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ import { Range } from 'vs/editor/common/core/range';
import { ICommonCodeEditor } from 'vs/editor/common/editorCommon';
import { FindModelBoundToEditorModel } from 'vs/editor/contrib/find/common/findModel';
import { FindReplaceState } from 'vs/editor/contrib/find/common/findState';
import { withMockCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { withTestCodeEditor } from 'vs/editor/test/browser/testCodeEditor';
import { CoreNavigationCommands } from 'vs/editor/common/controller/coreCommands';

suite('FindModel', () => {

function findTest(testName: string, callback: (editor: ICommonCodeEditor, cursor: Cursor) => void): void {
test(testName, () => {
withMockCodeEditor([
withTestCodeEditor([
'// my cool header',
'#include "cool.h"',
'#include <iostream>',
Expand Down

0 comments on commit dc517c0

Please sign in to comment.