Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
25b20b85
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
25b20b85
编写于
11月 08, 2017
作者:
M
Matt Bierner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use as for casting in a few more tests
上级
be88547c
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
23 addition
and
27 deletion
+23
-27
src/vs/editor/contrib/suggest/test/suggestModel.test.ts
src/vs/editor/contrib/suggest/test/suggestModel.test.ts
+18
-22
src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts
...Management/test/common/extensionEnablementService.test.ts
+1
-1
src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts
...nfiguration/test/node/configurationEditingService.test.ts
+1
-1
src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts
...vs/workbench/test/browser/parts/editor/baseEditor.test.ts
+1
-1
src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts
...kbench/test/electron-browser/api/extHostTreeViews.test.ts
+2
-2
未找到文件。
src/vs/editor/contrib/suggest/test/suggestModel.test.ts
浏览文件 @
25b20b85
...
...
@@ -70,8 +70,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
const
alwaysEmptySupport
:
ISuggestSupport
=
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
provideCompletionItems
(
doc
,
pos
)
:
ISuggestResult
{
return
{
incomplete
:
false
,
suggestions
:
[]
};
...
...
@@ -79,8 +79,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
};
const
alwaysSomethingSupport
:
ISuggestSupport
=
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
provideCompletionItems
(
doc
,
pos
)
:
ISuggestResult
{
return
{
incomplete
:
false
,
suggestions
:
[{
label
:
doc
.
getWordUntilPosition
(
pos
).
word
,
...
...
@@ -222,9 +222,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
test
(
'
#17400: Keep filtering suggestModel.ts after space
'
,
function
()
{
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
currentWord
:
''
,
provideCompletionItems
(
doc
,
pos
):
ISuggestResult
{
return
{
incomplete
:
false
,
suggestions
:
[{
label
:
'
My Table
'
,
...
...
@@ -272,9 +271,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
test
(
'
#21484: Trigger character always force a new completion session
'
,
function
()
{
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
currentWord
:
''
,
provideCompletionItems
(
doc
,
pos
):
ISuggestResult
{
return
{
incomplete
:
false
,
suggestions
:
[{
label
:
'
foo.bar
'
,
...
...
@@ -288,9 +286,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
triggerCharacters
:
[
'
.
'
],
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
currentWord
:
''
,
provideCompletionItems
(
doc
,
pos
):
ISuggestResult
{
return
{
incomplete
:
false
,
suggestions
:
[{
label
:
'
boom
'
,
...
...
@@ -383,8 +380,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
test
(
'
Incomplete suggestion results cause re-triggering when typing w/o further context, #28400 (1/2)
'
,
function
()
{
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
provideCompletionItems
(
doc
,
pos
)
:
ISuggestResult
{
return
{
incomplete
:
true
,
suggestions
:
[{
label
:
'
foo
'
,
...
...
@@ -420,8 +417,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
test
(
'
Incomplete suggestion results cause re-triggering when typing w/o further context, #28400 (2/2)
'
,
function
()
{
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
provideCompletionItems
(
doc
,
pos
)
:
ISuggestResult
{
return
{
incomplete
:
true
,
suggestions
:
[{
label
:
'
foo;
'
,
...
...
@@ -464,11 +461,10 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
let
triggerCharacter
=
''
;
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
triggerCharacters
:
[
'
.
'
],
provideCompletionItems
(
doc
,
pos
,
context
)
{
provideCompletionItems
(
doc
,
pos
,
context
)
:
ISuggestResult
{
assert
.
equal
(
context
.
triggerKind
,
SuggestTriggerKind
.
TriggerCharacter
);
triggerCharacter
=
context
.
triggerCharacter
;
return
<
ISuggestResult
>
{
currentWord
:
''
,
return
{
incomplete
:
false
,
suggestions
:
[
{
...
...
@@ -497,8 +493,8 @@ suite('SuggestModel - TriggerAndCancelOracle', function () {
test
(
'
Mac press and hold accent character insertion does not update suggestions, #35269
'
,
function
()
{
disposables
.
push
(
SuggestRegistry
.
register
({
scheme
:
'
test
'
},
{
provideCompletionItems
(
doc
,
pos
)
{
return
<
ISuggestResult
>
{
provideCompletionItems
(
doc
,
pos
)
:
ISuggestResult
{
return
{
incomplete
:
true
,
suggestions
:
[{
label
:
'
abc
'
,
...
...
src/vs/platform/extensionManagement/test/common/extensionEnablementService.test.ts
浏览文件 @
25b20b85
...
...
@@ -33,7 +33,7 @@ function storageService(instantiationService: TestInstantiationService): IStorag
export
class
TestExtensionEnablementService
extends
ExtensionEnablementService
{
constructor
(
instantiationService
:
TestInstantiationService
)
{
super
(
storageService
(
instantiationService
),
instantiationService
.
get
(
IWorkspaceContextService
),
instantiationService
.
get
(
IEnvironmentService
)
||
instantiationService
.
stub
(
IEnvironmentService
,
<
IEnvironmentService
>
{}
),
instantiationService
.
get
(
IEnvironmentService
)
||
instantiationService
.
stub
(
IEnvironmentService
,
{}
as
IEnvironmentService
),
instantiationService
.
get
(
IExtensionManagementService
)
||
instantiationService
.
stub
(
IExtensionManagementService
,
{
onDidUninstallExtension
:
new
Emitter
()
}));
}
...
...
src/vs/workbench/services/configuration/test/node/configurationEditingService.test.ts
浏览文件 @
25b20b85
...
...
@@ -108,7 +108,7 @@ suite('ConfigurationEditingService', () => {
const
workspacesService
=
instantiationService
.
stub
(
IWorkspacesService
,
{});
const
workspaceService
=
new
WorkspaceService
(
environmentService
,
workspacesService
);
instantiationService
.
stub
(
IWorkspaceContextService
,
workspaceService
);
return
workspaceService
.
initialize
(
noWorkspace
?
<
IWindowConfiguration
>
{}
:
workspaceDir
).
then
(()
=>
{
return
workspaceService
.
initialize
(
noWorkspace
?
{}
as
IWindowConfiguration
:
workspaceDir
).
then
(()
=>
{
instantiationService
.
stub
(
IConfigurationService
,
workspaceService
);
instantiationService
.
stub
(
IFileService
,
new
FileService
(
workspaceService
,
new
TestTextResourceConfigurationService
(),
new
TestConfigurationService
(),
{
disableWatcher
:
true
}));
instantiationService
.
stub
(
ITextFileService
,
instantiationService
.
createInstance
(
TestTextFileService
));
...
...
src/vs/workbench/test/browser/parts/editor/baseEditor.test.ts
浏览文件 @
25b20b85
...
...
@@ -70,7 +70,7 @@ class MyInputFactory implements IEditorInputFactory {
}
deserialize
(
instantiationService
:
IInstantiationService
,
raw
:
string
):
EditorInput
{
return
<
EditorInput
>
{}
;
return
{}
as
EditorInput
;
}
}
...
...
src/vs/workbench/test/electron-browser/api/extHostTreeViews.test.ts
浏览文件 @
25b20b85
...
...
@@ -119,7 +119,7 @@ suite('ExtHostConfiguration', function () {
});
function
aTreeDataProvider
():
TreeDataProvider
<
string
>
{
return
<
TreeDataProvider
<
string
>>
{
return
{
getChildren
:
(
element
:
string
):
string
[]
=>
{
if
(
!
element
)
{
return
[
'
a
'
,
'
b
'
];
...
...
@@ -133,7 +133,7 @@ suite('ExtHostConfiguration', function () {
return
[];
},
getTreeItem
:
(
element
:
string
):
TreeItem
=>
{
return
<
TreeItem
>
{
return
{
label
:
element
};
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录