提交 897159db 编写于 作者: M Martin Strecker

Fixes for Roslyn.Services.Editor.VisualBasic.UnitTests

上级 321210c5
......@@ -7073,7 +7073,7 @@ End Class]]>
</Project>
</Workspace>.ToString().NormalizeLineEndings()
Dim expectedDescription = $"(field) C.x As Integer"
Dim expectedDescription = $"({ FeaturesResources.field }) C.x As Integer"
Await VerifyItemInLinkedFilesAsync(markup, "x", expectedDescription)
End Function
......
......@@ -163,7 +163,7 @@ New TestParameters(fixProviderData:=New ProviderData(installerServiceMock.Object
Class C
Dim n As [|NuGetType|]
End Class",
"Use local version '1.0'",
String.Format(FeaturesResources.Use_local_version_0, "1.0"),
parameters:=New TestParameters(fixProviderData:=data))
Await TestSmartTagTextAsync(
......@@ -171,7 +171,7 @@ parameters:=New TestParameters(fixProviderData:=data))
Class C
Dim n As [|NuGetType|]
End Class",
"Use local version '2.0'",
String.Format(FeaturesResources.Use_local_version_0, "2.0"),
index:=1,
parameters:=New TestParameters(fixProviderData:=data))
......@@ -180,7 +180,7 @@ parameters:=New TestParameters(fixProviderData:=data))
Class C
Dim n As [|NuGetType|]
End Class",
"Find and install latest version",
FeaturesResources.Find_and_install_latest_version,
index:=2,
parameters:=New TestParameters(fixProviderData:=data))
End Function
......
......@@ -4227,7 +4227,7 @@ End Structure
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsImplementInterface)>
Public Async Function TestDisposePatternWhenAdditionalImportsAreIntroduced1() As Task
Await TestInRegularAndScriptAsync(
"Interface I(Of T, U As T) : Inherits System.IDisposable, System.IEquatable(Of Integer)
$"Interface I(Of T, U As T) : Inherits System.IDisposable, System.IEquatable(Of Integer)
Function M(a As System.Collections.Generic.Dictionary(Of T, System.Collections.Generic.List(Of U)), b As T, c As U) As System.Collections.Generic.List(Of U)
Function M(Of TT, UU As TT)(a As System.Collections.Generic.Dictionary(Of TT, System.Collections.Generic.List(Of UU)), b As TT, c As UU) As System.Collections.Generic.List(Of UU)
End Interface
......@@ -4265,33 +4265,33 @@ Class _
End Function
#Region ""IDisposable Support""
Private disposedValue As Boolean ' To detect redundant calls
Private disposedValue As Boolean ' { FeaturesResources.To_detect_redundant_calls }
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
' { FeaturesResources.TODO_colon_dispose_managed_state_managed_objects }
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
' TODO: set large fields to null.
' { VBFeaturesResources.TODO_colon_free_unmanaged_resources_unmanaged_objects_and_override_Finalize_below }
' { FeaturesResources.TODO_colon_set_large_fields_to_null }
End If
disposedValue = True
End Sub
' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources.
' { VBFeaturesResources.TODO_colon_override_Finalize_only_if_Dispose_disposing_As_Boolean_above_has_code_to_free_unmanaged_resources }
'Protected Overrides Sub Finalize()
' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
' ' { VBFeaturesResources.Do_not_change_this_code_Put_cleanup_code_in_Dispose_disposing_As_Boolean_above }
' Dispose(False)
' MyBase.Finalize()
'End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
' {VBFeaturesResources.This_code_added_by_Visual_Basic_to_correctly_implement_the_disposable_pattern }
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
' { VBFeaturesResources.Do_not_change_this_code_Put_cleanup_code_in_Dispose_disposing_As_Boolean_above }
Dispose(True)
' TODO: uncomment the following line if Finalize() is overridden above.
' { VBFeaturesResources.TODO_colon_uncomment_the_following_line_if_Finalize_is_overridden_above }
' GC.SuppressFinalize(Me)
End Sub
#End Region
......@@ -4307,7 +4307,7 @@ End Class",
<Fact, Trait(Traits.Feature, Traits.Features.CodeActionsImplementInterface)>
Public Async Function TestDisposePatternWhenAdditionalImportsAreIntroduced2() As Task
Await TestInRegularAndScriptAsync(
"Class C
$"Class C
End Class
Partial Class C
......@@ -4342,33 +4342,33 @@ Partial Class C
End Function
#Region ""IDisposable Support""
Private disposedValue As Boolean ' To detect redundant calls
Private disposedValue As Boolean ' { FeaturesResources.To_detect_redundant_calls }
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)
If Not disposedValue Then
If disposing Then
' TODO: dispose managed state (managed objects).
' { FeaturesResources.TODO_colon_dispose_managed_state_managed_objects }
End If
' TODO: free unmanaged resources (unmanaged objects) and override Finalize() below.
' TODO: set large fields to null.
' { VBFeaturesResources.TODO_colon_free_unmanaged_resources_unmanaged_objects_and_override_Finalize_below }
' { FeaturesResources.TODO_colon_set_large_fields_to_null }
End If
disposedValue = True
End Sub
' TODO: override Finalize() only if Dispose(disposing As Boolean) above has code to free unmanaged resources.
' { VBFeaturesResources.TODO_colon_override_Finalize_only_if_Dispose_disposing_As_Boolean_above_has_code_to_free_unmanaged_resources }
'Protected Overrides Sub Finalize()
' ' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
' ' { VBFeaturesResources.Do_not_change_this_code_Put_cleanup_code_in_Dispose_disposing_As_Boolean_above }
' Dispose(False)
' MyBase.Finalize()
'End Sub
' This code added by Visual Basic to correctly implement the disposable pattern.
' { VBFeaturesResources.This_code_added_by_Visual_Basic_to_correctly_implement_the_disposable_pattern }
Public Sub Dispose() Implements IDisposable.Dispose
' Do not change this code. Put cleanup code in Dispose(disposing As Boolean) above.
' { VBFeaturesResources.Do_not_change_this_code_Put_cleanup_code_in_Dispose_disposing_As_Boolean_above }
Dispose(True)
' TODO: uncomment the following line if Finalize() is overridden above.
' { VBFeaturesResources.TODO_colon_uncomment_the_following_line_if_Finalize_is_overridden_above }
' GC.SuppressFinalize(Me)
End Sub
#End Region
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册