Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lwm1986
roslyn
提交
a7132f90
R
roslyn
项目概览
lwm1986
/
roslyn
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
roslyn
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a7132f90
编写于
3月 14, 2020
作者:
C
Cyrus Najmabadi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add test
上级
370d73ca
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
28 addition
and
7 deletion
+28
-7
src/EditorFeatures/TestUtilities/ChangeSignature/TestChangeSignatureOptionsService.cs
...ties/ChangeSignature/TestChangeSignatureOptionsService.cs
+1
-2
src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialogViewModel.cs
...ntation/ChangeSignature/ChangeSignatureDialogViewModel.cs
+0
-1
src/VisualStudio/Core/Test/ChangeSignature/ChangeSignatureViewModelTests.vb
...ore/Test/ChangeSignature/ChangeSignatureViewModelTests.vb
+27
-4
未找到文件。
src/EditorFeatures/TestUtilities/ChangeSignature/TestChangeSignatureOptionsService.cs
浏览文件 @
a7132f90
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
using
System.Linq
;
using
System.Linq
;
using
Microsoft.CodeAnalysis.ChangeSignature
;
using
Microsoft.CodeAnalysis.ChangeSignature
;
using
Microsoft.CodeAnalysis.Host.Mef
;
using
Microsoft.CodeAnalysis.Host.Mef
;
using
Microsoft.CodeAnalysis.Notification
;
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.ChangeSignature
namespace
Microsoft.CodeAnalysis.Editor.UnitTests.ChangeSignature
{
{
...
@@ -21,7 +20,7 @@ public TestChangeSignatureOptionsService()
...
@@ -21,7 +20,7 @@ public TestChangeSignatureOptionsService()
{
{
}
}
public
ChangeSignatureOptionsResult
GetChangeSignatureOptions
(
ISymbol
symbol
,
ParameterConfiguration
parameters
,
INotificationService
notificationService
)
public
ChangeSignatureOptionsResult
GetChangeSignatureOptions
(
ISymbol
symbol
,
ParameterConfiguration
parameters
)
{
{
var
list
=
parameters
.
ToListOfParameters
();
var
list
=
parameters
.
ToListOfParameters
();
...
...
src/VisualStudio/Core/Def/Implementation/ChangeSignature/ChangeSignatureDialogViewModel.cs
浏览文件 @
a7132f90
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
using
Microsoft.CodeAnalysis.ChangeSignature
;
using
Microsoft.CodeAnalysis.ChangeSignature
;
using
Microsoft.CodeAnalysis.Editor.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Editor.Shared.Extensions
;
using
Microsoft.CodeAnalysis.Editor.Shared.Utilities
;
using
Microsoft.CodeAnalysis.Editor.Shared.Utilities
;
using
Microsoft.CodeAnalysis.Notification
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.Utilities
;
using
Microsoft.VisualStudio.LanguageServices.Implementation.Utilities
;
using
Microsoft.VisualStudio.Text.Classification
;
using
Microsoft.VisualStudio.Text.Classification
;
using
Roslyn.Utilities
;
using
Roslyn.Utilities
;
...
...
src/VisualStudio/Core/Test/ChangeSignature/ChangeSignatureViewModelTests.vb
浏览文件 @
a7132f90
...
@@ -8,7 +8,6 @@ Imports Microsoft.CodeAnalysis
...
@@ -8,7 +8,6 @@ Imports Microsoft.CodeAnalysis
Imports
Microsoft.CodeAnalysis.ChangeSignature
Imports
Microsoft.CodeAnalysis.ChangeSignature
Imports
Microsoft.CodeAnalysis.Editor.Shared.Utilities
Imports
Microsoft.CodeAnalysis.Editor.Shared.Utilities
Imports
Microsoft.CodeAnalysis.Editor.UnitTests.Extensions
Imports
Microsoft.CodeAnalysis.Editor.UnitTests.Extensions
Imports
Microsoft.CodeAnalysis.Editor.UnitTests.Utilities
Imports
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports
Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces
Imports
Microsoft.CodeAnalysis.LanguageServices
Imports
Microsoft.CodeAnalysis.LanguageServices
Imports
Microsoft.CodeAnalysis.Shared.Extensions
Imports
Microsoft.CodeAnalysis.Shared.Extensions
...
@@ -260,6 +259,33 @@ class MyClass
...
@@ -260,6 +259,33 @@ class MyClass
type
:
=
"string?"
)
type
:
=
"string?"
)
End
Function
End
Function
<
Fact
,
Trait
(
Traits
.
Feature
,
Traits
.
Features
.
ChangeSignature
)
>
<
WorkItem
(
30315
,
"https://github.com/dotnet/roslyn/issues/30315"
)
>
Public
Async
Function
ChangeSignature_ParameterDisplay_DefaultStruct
()
As
Tasks
.
Task
Dim
markup
=
<
Text
><
!
[
CDATA
[
struct
MyStruct
{
}
class
Goo
{
void
$$
Bar
(
MyStruct
s
=
default
(
MyStruct
))
{
}
}
"]]></Text>
Dim viewModelTestState = Await GetViewModelTestStateAsync(markup, LanguageNames.CSharp)
Dim viewModel = viewModelTestState.ViewModel
VerifyOpeningState(viewModel, "
private
void
Bar
(
MyStruct
s
=
default
(
MyStruct
))
")
VerifyParameterInfo(
viewModel,
parameterIndex:=0,
type:="
MyStruct
",
defaultValue:="
default
")
End Function
Private Sub VerifyAlteredState(
Private Sub VerifyAlteredState(
viewModelTestState As ChangeSignatureViewModelTestState,
viewModelTestState As ChangeSignatureViewModelTestState,
Optional monitor As PropertyChangedTestMonitor = Nothing,
Optional monitor As PropertyChangedTestMonitor = Nothing,
...
@@ -352,8 +378,6 @@ class MyClass
...
@@ -352,8 +378,6 @@ class MyClass
If needsBottomBorder.HasValue Then
If needsBottomBorder.HasValue Then
Assert.Equal(needsBottomBorder.Value, parameter.NeedsBottomBorder)
Assert.Equal(needsBottomBorder.Value, parameter.NeedsBottomBorder)
End If
End If
End Sub
End Sub
Private Async Function GetViewModelTestStateAsync(
Private Async Function GetViewModelTestStateAsync(
...
@@ -379,7 +403,6 @@ class MyClass
...
@@ -379,7 +403,6 @@ class MyClass
Dim
symbol
=
(
Await
workspaceDoc
.
GetSemanticModelAsync
()).
GetDeclaredSymbol
(
token
.
Parent
)
Dim
symbol
=
(
Await
workspaceDoc
.
GetSemanticModelAsync
()).
GetDeclaredSymbol
(
token
.
Parent
)
Dim
viewModel
=
New
ChangeSignatureDialogViewModel
(
Dim
viewModel
=
New
ChangeSignatureDialogViewModel
(
New
TestNotificationService
(),
ParameterConfiguration
.
Create
(
symbol
.
GetParameters
().
ToList
(),
symbol
.
IsExtensionMethod
(),
selectedIndex
:
=
0
),
ParameterConfiguration
.
Create
(
symbol
.
GetParameters
().
ToList
(),
symbol
.
IsExtensionMethod
(),
selectedIndex
:
=
0
),
symbol
,
symbol
,
workspace
.
ExportProvider
.
GetExportedValue
(
Of
IClassificationFormatMapService
)().
GetClassificationFormatMap
(
"text"
),
workspace
.
ExportProvider
.
GetExportedValue
(
Of
IClassificationFormatMapService
)().
GetClassificationFormatMap
(
"text"
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录