diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeAttributeTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeAttributeTests.vb
index e7fd74e853c5770dfdc5e8c6d3f2cd8af41017a7..e7c64ba22244da77162698419dfca24db4539a58 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeAttributeTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeAttributeTests.vb
@@ -55,8 +55,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Return codeElement.AddArgument(data.Value, data.Name, data.Position)
End Function
- Protected Sub TestAttributeArguments(code As XElement, ParamArray expectedAttributeArguments() As Action(Of Object))
- TestElement(code,
+ Protected Async Function TestAttributeArguments(code As XElement, ParamArray expectedAttributeArguments() As Action(Of Object)) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim attributes = GetAttributeArguments(codeElement)
Assert.Equal(expectedAttributeArguments.Length, attributes.Count)
@@ -65,61 +65,61 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedAttributeArguments(i - 1)(attributes.Item(i))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestTarget(code As XElement, expectedTarget As String)
- TestElement(code,
+ Protected Async Function TestTarget(code As XElement, expectedTarget As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim target = GetTarget(codeElement)
Assert.Equal(expectedTarget, target)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetTarget(code As XElement, expectedCode As XElement, target As String)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetTarget(code As XElement, expectedCode As XElement, target As String) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
codeElement.Target = target
End Sub)
- End Sub
+ End Function
- Protected Sub TestValue(code As XElement, expectedValue As String)
- TestElement(code,
+ Protected Async Function TestValue(code As XElement, expectedValue As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim target = GetValue(codeElement)
Assert.Equal(expectedValue, target)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetValue(code As XElement, expectedCode As XElement, value As String)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetValue(code As XElement, expectedCode As XElement, value As String) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
codeElement.Value = value
End Sub)
- End Sub
+ End Function
- Protected Sub TestAddAttributeArgument(code As XElement, expectedCode As XElement, data As AttributeArgumentData)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestAddAttributeArgument(code As XElement, expectedCode As XElement, data As AttributeArgumentData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim attributeArgument = AddAttributeArgument(codeElement, data)
Assert.NotNull(attributeArgument)
Assert.Equal(data.Name, attributeArgument.Name)
End Sub)
- End Sub
+ End Function
- Protected Sub TestDelete(code As XElement, expectedCode As XElement)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestDelete(code As XElement, expectedCode As XElement) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
codeElement.Delete()
End Sub)
- End Sub
+ End Function
- Protected Sub TestDeleteAttributeArgument(code As XElement, expectedCode As XElement, indexToDelete As Integer)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestDeleteAttributeArgument(code As XElement, expectedCode As XElement, indexToDelete As Integer) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim argument = CType(codeElement.Arguments.Item(indexToDelete), EnvDTE80.CodeAttributeArgument)
argument.Delete()
End Sub)
- End Sub
+ End Function
Protected Function IsAttributeArgument(Optional name As String = Nothing, Optional value As String = Nothing) As Action(Of Object)
Return _
@@ -137,8 +137,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
End Sub
End Function
- Protected Sub TestAttributeArgumentStartPoint(code As XElement, index As Integer, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint)))
- TestElement(code,
+ Protected Async Function TestAttributeArgumentStartPoint(code As XElement, index As Integer, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint))) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim arg = CType(codeElement.Arguments.Item(index), EnvDTE80.CodeAttributeArgument)
@@ -148,10 +148,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
action(startPointGetter)
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestAttributeArgumentEndPoint(code As XElement, index As Integer, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint)))
- TestElement(code,
+ Protected Async Function TestAttributeArgumentEndPoint(code As XElement, index As Integer, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint))) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim arg = CType(codeElement.Arguments.Item(index), EnvDTE80.CodeAttributeArgument)
@@ -161,7 +161,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
action(endPointGetter)
Next
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeClassTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeClassTests.vb
index e1ffa6a05e8eee224535206200c5538be724fa08..c64eed22dc85e0b2248ba9ee7f564cea99216552 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeClassTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeClassTests.vb
@@ -166,8 +166,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
codeElement.RemoveInterface(element)
End Sub
- Protected Sub TestGetBaseName(code As XElement, expectedBaseName As String)
- TestElement(code,
+ Protected Async Function TestGetBaseName(code As XElement, expectedBaseName As String) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeClass)
Dim codeClassBase = TryCast(codeClass, ICodeClassBase)
Assert.NotNull(codeClassBase)
@@ -178,6 +178,6 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Equal(expectedBaseName, baseName)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeDelegateTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeDelegateTests.vb
index 17dec1b008884f7388b4e5c75b46a5a462aedb33..e63689d52e046fff692b0a6a73e58c3eb61523d5 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeDelegateTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeDelegateTests.vb
@@ -76,13 +76,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
codeElement.RemoveParameter(child)
End Sub
- Protected Sub TestBaseClass(code As XElement, expectedFullName As String)
- TestElement(code,
+ Protected Async Function TestBaseClass(code As XElement, expectedFullName As String) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.NotNull(codeElement.BaseClass)
Assert.Equal(expectedFullName, codeElement.BaseClass.FullName)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeElementTests`1.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeElementTests`1.vb
index 6f4f216125cb37b22669cde1a7e6701cd792a611..01d2f10a7550f909c9dc64e05382a7f92928c74e 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeElementTests`1.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeElementTests`1.vb
@@ -22,17 +22,17 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
codeElement)
End Function
- Protected Sub TestElement(code As XElement, expected As Action(Of TCodeElement))
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Protected Async Function TestElement(code As XElement, expected As Action(Of TCodeElement)) As Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim codeElement = GetCodeElement(state)
Assert.NotNull(codeElement)
expected(codeElement)
End Using
- End Sub
+ End Function
- Protected Overloads Sub TestElementUpdate(code As XElement, expectedCode As XElement, updater As Action(Of TCodeElement))
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Protected Overloads Async Function TestElementUpdate(code As XElement, expectedCode As XElement, updater As Action(Of TCodeElement)) As Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim codeElement = GetCodeElement(state)
Assert.NotNull(codeElement)
@@ -41,10 +41,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Dim text = state.GetDocumentAtCursor().GetTextAsync(CancellationToken.None).Result.ToString()
Assert.Equal(expectedCode.NormalizedValue.Trim(), text.Trim())
End Using
- End Sub
+ End Function
- Friend Overloads Sub TestElementUpdate(code As XElement, expectedCode As XElement, updater As Action(Of CodeModelTestState, TCodeElement))
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Friend Overloads Async Function TestElementUpdate(code As XElement, expectedCode As XElement, updater As Action(Of CodeModelTestState, TCodeElement)) As Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim codeElement = GetCodeElement(state)
Assert.NotNull(codeElement)
@@ -53,7 +53,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Dim text = state.GetDocumentAtCursor().GetTextAsync(CancellationToken.None).Result.ToString()
Assert.Equal(expectedCode.NormalizedValue.Trim(), text.Trim())
End Using
- End Sub
+ End Function
Protected Delegate Sub PartAction(part As EnvDTE.vsCMPart, textPointGetter As Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint))
@@ -410,8 +410,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Throw New NotSupportedException
End Sub
- Protected Sub TestPropertyDescriptors(code As XElement, ParamArray expectedPropertyNames As String())
- TestElement(code,
+ Protected Async Function TestPropertyDescriptors(code As XElement, ParamArray expectedPropertyNames As String()) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim propertyDescriptors = ComponentModel.TypeDescriptor.GetProperties(codeElement)
Dim propertyNames = propertyDescriptors _
@@ -421,10 +421,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Equal(expectedPropertyNames, propertyNames)
End Sub)
- End Sub
+ End Function
- Protected Sub TestGetStartPoint(code As XElement, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint)))
- TestElement(code,
+ Protected Async Function TestGetStartPoint(code As XElement, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint))) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim textPointGetter = GetStartPointFunc(codeElement)
@@ -432,10 +432,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
action(textPointGetter)
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestGetEndPoint(code As XElement, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint)))
- TestElement(code,
+ Protected Async Function TestGetEndPoint(code As XElement, ParamArray expectedParts() As Action(Of Func(Of EnvDTE.vsCMPart, EnvDTE.TextPoint))) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim textPointGetter = GetEndPointFunc(codeElement)
@@ -443,18 +443,18 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
action(textPointGetter)
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestAccess(code As XElement, expectedAccess As EnvDTE.vsCMAccess)
- TestElement(code,
+ Protected Async Function TestAccess(code As XElement, expectedAccess As EnvDTE.vsCMAccess) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim access = GetAccess(codeElement)
Assert.Equal(expectedAccess, access)
End Sub)
- End Sub
+ End Function
- Protected Sub TestAttributes(code As XElement, ParamArray expectedAttributes() As Action(Of Object))
- TestElement(code,
+ Protected Async Function TestAttributes(code As XElement, ParamArray expectedAttributes() As Action(Of Object)) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim attributes = GetAttributes(codeElement)
Assert.Equal(expectedAttributes.Length, attributes.Count)
@@ -463,10 +463,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedAttributes(i - 1)(attributes.Item(i))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestBases(code As XElement, ParamArray expectedBases() As Action(Of Object))
- TestElement(code,
+ Protected Async Function TestBases(code As XElement, ParamArray expectedBases() As Action(Of Object)) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim bases = GetBases(codeElement)
Assert.Equal(expectedBases.Length, bases.Count)
@@ -475,10 +475,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedBases(i - 1)(bases.Item(i))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestChildren(code As XElement, ParamArray expectedChildren() As Action(Of Object))
- TestElement(code,
+ Protected Async Function TestChildren(code As XElement, ParamArray expectedChildren() As Action(Of Object)) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim element = CType(codeElement, EnvDTE.CodeElement)
Assert.True(element IsNot Nothing, "Could not cast " & GetType(TCodeElement).FullName & " to " & GetType(EnvDTE.CodeElement).FullName & ".")
@@ -490,58 +490,58 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedChildren(i - 1)(children.Item(i))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestClassKind(code As XElement, expectedClassKind As EnvDTE80.vsCMClassKind)
- TestElement(code,
+ Protected Async Function TestClassKind(code As XElement, expectedClassKind As EnvDTE80.vsCMClassKind) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim classKind = GetClassKind(codeElement)
Assert.Equal(expectedClassKind, classKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestComment(code As XElement, expectedComment As String)
- TestElement(code,
+ Protected Async Function TestComment(code As XElement, expectedComment As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim comment = GetComment(codeElement)
Assert.Equal(expectedComment, comment)
End Sub)
- End Sub
+ End Function
- Protected Sub TestConstKind(code As XElement, expectedConstKind As EnvDTE80.vsCMConstKind)
- TestElement(code,
+ Protected Async Function TestConstKind(code As XElement, expectedConstKind As EnvDTE80.vsCMConstKind) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim constKind = GetConstKind(codeElement)
Assert.Equal(expectedConstKind, constKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestDataTypeKind(code As XElement, expectedDataTypeKind As EnvDTE80.vsCMDataTypeKind)
- TestElement(code,
+ Protected Async Function TestDataTypeKind(code As XElement, expectedDataTypeKind As EnvDTE80.vsCMDataTypeKind) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim dataTypeKind = GetDataTypeKind(codeElement)
Assert.Equal(expectedDataTypeKind, dataTypeKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestDocComment(code As XElement, expectedDocComment As String)
- TestElement(code,
+ Protected Async Function TestDocComment(code As XElement, expectedDocComment As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim docComment = GetDocComment(codeElement)
Assert.Equal(expectedDocComment, docComment)
End Sub)
- End Sub
+ End Function
- Protected Sub TestFullName(code As XElement, expectedFullName As String)
- TestElement(code,
+ Protected Async Function TestFullName(code As XElement, expectedFullName As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim fullName = GetFullName(codeElement)
Assert.Equal(expectedFullName, fullName)
End Sub)
- End Sub
+ End Function
- Protected Sub TestImplementedInterfaces(code As XElement, ParamArray expectedBases() As Action(Of Object))
- TestElement(code,
+ Protected Async Function TestImplementedInterfaces(code As XElement, ParamArray expectedBases() As Action(Of Object)) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim implementedInterfaces = GetImplementedInterfaces(codeElement)
Assert.Equal(expectedBases.Length, implementedInterfaces.Count)
@@ -550,166 +550,166 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedBases(i - 1)(implementedInterfaces.Item(i))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestInheritanceKind(code As XElement, expectedInheritanceKind As EnvDTE80.vsCMInheritanceKind)
- TestElement(code,
+ Protected Async Function TestInheritanceKind(code As XElement, expectedInheritanceKind As EnvDTE80.vsCMInheritanceKind) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim inheritanceKind = GetInheritanceKind(codeElement)
Assert.Equal(expectedInheritanceKind, inheritanceKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestIsAbstract(code As XElement, expectedValue As Boolean)
- TestElement(code,
+ Protected Async Function TestIsAbstract(code As XElement, expectedValue As Boolean) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim value = GetIsAbstract(codeElement)
Assert.Equal(expectedValue, value)
End Sub)
- End Sub
+ End Function
- Protected Sub TestIsDefault(code As XElement, expectedValue As Boolean)
- TestElement(code,
+ Protected Async Function TestIsDefault(code As XElement, expectedValue As Boolean) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim value = GetIsDefault(codeElement)
Assert.Equal(expectedValue, value)
End Sub)
- End Sub
+ End Function
- Protected Sub TestIsGeneric(code As XElement, expectedValue As Boolean)
- TestElement(code,
+ Protected Async Function TestIsGeneric(code As XElement, expectedValue As Boolean) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim value = GetIsGeneric(codeElement)
Assert.Equal(expectedValue, value)
End Sub)
- End Sub
+ End Function
- Protected Sub TestIsShared(code As XElement, expectedValue As Boolean)
- TestElement(code,
+ Protected Async Function TestIsShared(code As XElement, expectedValue As Boolean) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim value = GetIsShared(codeElement)
Assert.Equal(expectedValue, value)
End Sub)
- End Sub
+ End Function
- Protected Sub TestKind(code As XElement, expectedKind As EnvDTE.vsCMElement)
- TestElement(code,
+ Protected Async Function TestKind(code As XElement, expectedKind As EnvDTE.vsCMElement) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim kind = GetKind(codeElement)
Assert.Equal(expectedKind, kind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestMustImplement(code As XElement, expectedValue As Boolean)
- TestElement(code,
+ Protected Async Function TestMustImplement(code As XElement, expectedValue As Boolean) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim value = GetMustImplement(codeElement)
Assert.Equal(expectedValue, value)
End Sub)
- End Sub
+ End Function
- Protected Sub TestName(code As XElement, expectedName As String)
- TestElement(code,
+ Protected Async Function TestName(code As XElement, expectedName As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim name = GetName(codeElement)
Assert.Equal(expectedName, name)
End Sub)
- End Sub
+ End Function
- Protected Sub TestOverrideKind(code As XElement, expectedOverrideKind As EnvDTE80.vsCMOverrideKind)
- TestElement(code,
+ Protected Async Function TestOverrideKind(code As XElement, expectedOverrideKind As EnvDTE80.vsCMOverrideKind) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim overrideKind = GetOverrideKind(codeElement)
Assert.Equal(expectedOverrideKind, overrideKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestParts(code As XElement, expectedPartCount As Integer)
- TestElement(code,
+ Protected Async Function TestParts(code As XElement, expectedPartCount As Integer) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim parts = GetParts(codeElement)
' TODO: Test the elements themselves, not just the count (PartialTypeCollection.Item is not fully implemented)
Assert.Equal(expectedPartCount, parts.Count)
End Sub)
- End Sub
+ End Function
- Protected Sub TestParent(code As XElement, expectedParent As Action(Of Object))
- TestElement(code,
+ Protected Async Function TestParent(code As XElement, expectedParent As Action(Of Object)) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim parent = GetParent(codeElement)
expectedParent(parent)
End Sub)
- End Sub
+ End Function
- Protected Sub TestPrototype(code As XElement, flags As EnvDTE.vsCMPrototype, expectedPrototype As String)
- TestElement(code,
+ Protected Async Function TestPrototype(code As XElement, flags As EnvDTE.vsCMPrototype, expectedPrototype As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim prototype = GetPrototype(codeElement, flags)
Assert.Equal(expectedPrototype, prototype)
End Sub)
- End Sub
+ End Function
- Protected Sub TestPrototypeThrows(Of TException As Exception)(code As XElement, flags As EnvDTE.vsCMPrototype)
- TestElement(code,
+ Protected Async Function TestPrototypeThrows(Of TException As Exception)(code As XElement, flags As EnvDTE.vsCMPrototype) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() GetPrototype(codeElement, flags))
End Sub)
- End Sub
+ End Function
- Protected Sub TestReadWrite(code As XElement, expectedOverrideKind As EnvDTE80.vsCMPropertyKind)
- TestElement(code,
+ Protected Async Function TestReadWrite(code As XElement, expectedOverrideKind As EnvDTE80.vsCMPropertyKind) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim readWrite = GetReadWrite(codeElement)
Assert.Equal(expectedOverrideKind, readWrite)
End Sub)
- End Sub
+ End Function
- Protected Sub TestIsDerivedFrom(code As XElement, baseFullName As String, expectedIsDerivedFrom As Boolean)
- TestElement(code,
+ Protected Async Function TestIsDerivedFrom(code As XElement, baseFullName As String, expectedIsDerivedFrom As Boolean) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim actualIsDerivedFrom = IsDerivedFrom(codeElement, baseFullName)
Assert.Equal(expectedIsDerivedFrom, actualIsDerivedFrom)
End Sub)
- End Sub
+ End Function
- Protected Sub TestTypeProp(code As XElement, data As CodeTypeRefData)
- TestElement(code,
+ Protected Async Function TestTypeProp(code As XElement, data As CodeTypeRefData) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim codeTypeRef = GetTypeProp(codeElement)
TestCodeTypeRef(codeTypeRef, data)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddAttribute(code As XElement, expectedCode As XElement, data As AttributeData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddAttribute(code As XElement, expectedCode As XElement, data As AttributeData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim attribute = AddAttribute(codeElement, data)
Assert.NotNull(attribute)
Assert.Equal(data.Name, attribute.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddEnumMember(code As XElement, expectedCode As XElement, data As EnumMemberData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddEnumMember(code As XElement, expectedCode As XElement, data As EnumMemberData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim enumMember = AddEnumMember(codeElement, data)
Assert.NotNull(enumMember)
Assert.Equal(data.Name, enumMember.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddEvent(code As XElement, expectedCode As XElement, data As EventData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddEvent(code As XElement, expectedCode As XElement, data As EventData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim ev = AddEvent(codeElement, data)
Assert.NotNull(ev)
Assert.Equal(data.Name, ev.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddFunction(code As XElement, expectedCode As XElement, data As FunctionData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddFunction(code As XElement, expectedCode As XElement, data As FunctionData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim func = AddFunction(codeElement, data)
Assert.NotNull(func)
@@ -718,10 +718,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Equal(data.Name, func.Name)
End If
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddParameter(code As XElement, expectedCode As XElement, data As ParameterData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddParameter(code As XElement, expectedCode As XElement, data As ParameterData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim name = GetName(codeElement)
@@ -733,28 +733,28 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
' can still access the parent element after adding the parameter.
Assert.Equal(name, GetName(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddProperty(code As XElement, expectedCode As XElement, data As PropertyData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddProperty(code As XElement, expectedCode As XElement, data As PropertyData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim prop = AddProperty(codeElement, data)
Assert.NotNull(prop)
Assert.True(data.GetterName = prop.Name OrElse data.PutterName = prop.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddVariable(code As XElement, expectedCode As XElement, data As VariableData)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestAddVariable(code As XElement, expectedCode As XElement, data As VariableData) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim variable = AddVariable(codeElement, data)
Assert.NotNull(variable)
Assert.Equal(data.Name, variable.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestRemoveChild(code As XElement, expectedCode As XElement, child As Object)
- TestElementUpdate(code, expectedCode,
+ Protected Overrides Async Function TestRemoveChild(code As XElement, expectedCode As XElement, child As Object) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim name = GetName(codeElement)
@@ -764,295 +764,295 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
' can still access the parent element after deleting the child.
Assert.Equal(name, GetName(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetAccess(code As XElement, expectedCode As XElement, access As EnvDTE.vsCMAccess)
- TestSetAccess(code, expectedCode, access, NoThrow(Of EnvDTE.vsCMAccess)())
- End Sub
+ Protected Async Function TestSetAccess(code As XElement, expectedCode As XElement, access As EnvDTE.vsCMAccess) As Tasks.Task
+ Await TestSetAccess(code, expectedCode, access, NoThrow(Of EnvDTE.vsCMAccess)())
+ End Function
- Protected Sub TestSetAccess(code As XElement, expectedCode As XElement, access As EnvDTE.vsCMAccess, action As SetterAction(Of EnvDTE.vsCMAccess))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetAccess(code As XElement, expectedCode As XElement, access As EnvDTE.vsCMAccess, action As SetterAction(Of EnvDTE.vsCMAccess)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim accessSetter = GetAccessSetter(codeElement)
action(access, accessSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetClassKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMClassKind)
- TestSetClassKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMClassKind)())
- End Sub
+ Protected Async Function TestSetClassKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMClassKind) As Tasks.Task
+ Await TestSetClassKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMClassKind)())
+ End Function
- Protected Sub TestSetClassKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMClassKind, action As SetterAction(Of EnvDTE80.vsCMClassKind))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetClassKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMClassKind, action As SetterAction(Of EnvDTE80.vsCMClassKind)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim classKindSetter = GetClassKindSetter(codeElement)
action(kind, classKindSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetComment(code As XElement, expectedCode As XElement, value As String)
- TestSetComment(code, expectedCode, value, NoThrow(Of String)())
- End Sub
+ Protected Async Function TestSetComment(code As XElement, expectedCode As XElement, value As String) As Tasks.Task
+ Await TestSetComment(code, expectedCode, value, NoThrow(Of String)())
+ End Function
- Protected Sub TestSetComment(code As XElement, expectedCode As XElement, value As String, action As SetterAction(Of String))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetComment(code As XElement, expectedCode As XElement, value As String, action As SetterAction(Of String)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim commentSetter = GetCommentSetter(codeElement)
action(value, commentSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetConstKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMConstKind)
- TestSetConstKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMConstKind)())
- End Sub
+ Protected Async Function TestSetConstKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMConstKind) As Tasks.Task
+ Await TestSetConstKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMConstKind)())
+ End Function
- Protected Sub TestSetConstKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMConstKind, action As SetterAction(Of EnvDTE80.vsCMConstKind))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetConstKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMConstKind, action As SetterAction(Of EnvDTE80.vsCMConstKind)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim constKindSetter = GetConstKindSetter(codeElement)
action(kind, constKindSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetDataTypeKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMDataTypeKind)
- TestSetDataTypeKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMDataTypeKind)())
- End Sub
+ Protected Async Function TestSetDataTypeKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMDataTypeKind) As Tasks.Task
+ Await TestSetDataTypeKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMDataTypeKind)())
+ End Function
- Protected Sub TestSetDataTypeKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMDataTypeKind, action As SetterAction(Of EnvDTE80.vsCMDataTypeKind))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetDataTypeKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMDataTypeKind, action As SetterAction(Of EnvDTE80.vsCMDataTypeKind)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim dataTypeKindSetter = GetDataTypeKindSetter(codeElement)
action(kind, dataTypeKindSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetDocComment(code As XElement, expectedCode As XElement, value As String)
- TestSetDocComment(code, expectedCode, value, NoThrow(Of String)())
- End Sub
+ Protected Async Function TestSetDocComment(code As XElement, expectedCode As XElement, value As String) As Tasks.Task
+ Await TestSetDocComment(code, expectedCode, value, NoThrow(Of String)())
+ End Function
- Protected Sub TestSetDocComment(code As XElement, expectedCode As XElement, value As String, action As SetterAction(Of String))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetDocComment(code As XElement, expectedCode As XElement, value As String, action As SetterAction(Of String)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim docCommentSetter = GetDocCommentSetter(codeElement)
action(value, docCommentSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetInheritanceKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMInheritanceKind)
- TestSetInheritanceKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMInheritanceKind)())
- End Sub
+ Protected Async Function TestSetInheritanceKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMInheritanceKind) As Tasks.Task
+ Await TestSetInheritanceKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMInheritanceKind)())
+ End Function
- Protected Sub TestSetInheritanceKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMInheritanceKind, action As SetterAction(Of EnvDTE80.vsCMInheritanceKind))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetInheritanceKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMInheritanceKind, action As SetterAction(Of EnvDTE80.vsCMInheritanceKind)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim inheritanceKindSetter = GetInheritanceKindSetter(codeElement)
action(kind, inheritanceKindSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetIsAbstract(code As XElement, expectedCode As XElement, value As Boolean)
- TestSetIsAbstract(code, expectedCode, value, NoThrow(Of Boolean)())
- End Sub
+ Protected Async Function TestSetIsAbstract(code As XElement, expectedCode As XElement, value As Boolean) As Tasks.Task
+ Await TestSetIsAbstract(code, expectedCode, value, NoThrow(Of Boolean)())
+ End Function
- Protected Sub TestSetIsAbstract(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetIsAbstract(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim isAbstractSetter = GetIsAbstractSetter(codeElement)
action(value, isAbstractSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetIsDefault(code As XElement, expectedCode As XElement, value As Boolean)
- TestSetIsDefault(code, expectedCode, value, NoThrow(Of Boolean)())
- End Sub
+ Protected Async Function TestSetIsDefault(code As XElement, expectedCode As XElement, value As Boolean) As Tasks.Task
+ Await TestSetIsDefault(code, expectedCode, value, NoThrow(Of Boolean)())
+ End Function
- Protected Sub TestSetIsDefault(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetIsDefault(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim isDefaultSetter = GetIsDefaultSetter(codeElement)
action(value, isDefaultSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetIsShared(code As XElement, expectedCode As XElement, value As Boolean)
- TestSetIsShared(code, expectedCode, value, NoThrow(Of Boolean)())
- End Sub
+ Protected Async Function TestSetIsShared(code As XElement, expectedCode As XElement, value As Boolean) As Tasks.Task
+ Await TestSetIsShared(code, expectedCode, value, NoThrow(Of Boolean)())
+ End Function
- Protected Sub TestSetIsShared(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetIsShared(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim isSharedSetter = GetIsSharedSetter(codeElement)
action(value, isSharedSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetMustImplement(code As XElement, expectedCode As XElement, value As Boolean)
- TestSetMustImplement(code, expectedCode, value, NoThrow(Of Boolean)())
- End Sub
+ Protected Async Function TestSetMustImplement(code As XElement, expectedCode As XElement, value As Boolean) As Tasks.Task
+ Await TestSetMustImplement(code, expectedCode, value, NoThrow(Of Boolean)())
+ End Function
- Protected Sub TestSetMustImplement(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetMustImplement(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim mustImplementSetter = GetMustImplementSetter(codeElement)
action(value, mustImplementSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetOverrideKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMOverrideKind)
- TestSetOverrideKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMOverrideKind)())
- End Sub
+ Protected Async Function TestSetOverrideKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMOverrideKind) As Tasks.Task
+ Await TestSetOverrideKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMOverrideKind)())
+ End Function
- Protected Sub TestSetOverrideKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMOverrideKind, action As SetterAction(Of EnvDTE80.vsCMOverrideKind))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetOverrideKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMOverrideKind, action As SetterAction(Of EnvDTE80.vsCMOverrideKind)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim overrideKindSetter = GetOverrideKindSetter(codeElement)
action(kind, overrideKindSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetName(code As XElement, expectedCode As XElement, name As String, action As SetterAction(Of String))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetName(code As XElement, expectedCode As XElement, name As String, action As SetterAction(Of String)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim nameSetter = GetNameSetter(codeElement)
action(name, nameSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestNamespaceName(code As XElement, name As String)
- TestElement(code,
+ Protected Async Function TestNamespaceName(code As XElement, name As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim codeNamespaceElement = GetNamespace(codeElement)
Assert.NotNull(codeNamespaceElement)
Assert.Equal(name, codeNamespaceElement.Name)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetTypeProp(code As XElement, expectedCode As XElement, codeTypeRef As EnvDTE.CodeTypeRef)
- TestSetTypeProp(code, expectedCode, codeTypeRef, NoThrow(Of EnvDTE.CodeTypeRef)())
- End Sub
+ Protected Async Function TestSetTypeProp(code As XElement, expectedCode As XElement, codeTypeRef As EnvDTE.CodeTypeRef) As Tasks.Task
+ Await TestSetTypeProp(code, expectedCode, codeTypeRef, NoThrow(Of EnvDTE.CodeTypeRef)())
+ End Function
- Protected Sub TestSetTypeProp(code As XElement, expectedCode As XElement, codeTypeRef As EnvDTE.CodeTypeRef, action As SetterAction(Of EnvDTE.CodeTypeRef))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetTypeProp(code As XElement, expectedCode As XElement, codeTypeRef As EnvDTE.CodeTypeRef, action As SetterAction(Of EnvDTE.CodeTypeRef)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim typePropSetter = GetTypePropSetter(codeElement)
action(codeTypeRef, typePropSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetTypeProp(code As XElement, expectedCode As XElement, typeName As String)
- TestSetTypeProp(code, expectedCode, typeName, NoThrow(Of EnvDTE.CodeTypeRef)())
- End Sub
+ Protected Async Function TestSetTypeProp(code As XElement, expectedCode As XElement, typeName As String) As Tasks.Task
+ Await TestSetTypeProp(code, expectedCode, typeName, NoThrow(Of EnvDTE.CodeTypeRef)())
+ End Function
- Protected Sub TestSetTypeProp(code As XElement, expectedCode As XElement, typeName As String, action As SetterAction(Of EnvDTE.CodeTypeRef))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetTypeProp(code As XElement, expectedCode As XElement, typeName As String, action As SetterAction(Of EnvDTE.CodeTypeRef)) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(state, codeElement)
Dim codeTypeRef = state.RootCodeModel.CreateCodeTypeRef(typeName)
Dim typePropSetter = GetTypePropSetter(codeElement)
action(codeTypeRef, typePropSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestGenericNameExtender_GetBaseTypesCount(code As XElement, expected As Integer)
- TestElement(code,
+ Protected Async Function TestGenericNameExtender_GetBaseTypesCount(code As XElement, expected As Integer) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, GenericNameExtender_GetBaseTypesCount(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestGenericNameExtender_GetImplementedTypesCount(code As XElement, expected As Integer)
- TestElement(code,
+ Protected Async Function TestGenericNameExtender_GetImplementedTypesCount(code As XElement, expected As Integer) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, GenericNameExtender_GetImplementedTypesCount(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestGenericNameExtender_GetImplementedTypesCountThrows(Of TException As Exception)(code As XElement)
- TestElement(code,
+ Protected Async Function TestGenericNameExtender_GetImplementedTypesCountThrows(Of TException As Exception)(code As XElement) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() GenericNameExtender_GetImplementedTypesCount(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestGenericNameExtender_GetBaseGenericName(code As XElement, index As Integer, expected As String)
- TestElement(code,
+ Protected Async Function TestGenericNameExtender_GetBaseGenericName(code As XElement, index As Integer, expected As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, GenericNameExtender_GetBaseGenericName(codeElement, index))
End Sub)
- End Sub
+ End Function
- Protected Sub TestGenericNameExtender_GetImplTypeGenericName(code As XElement, index As Integer, expected As String)
- TestElement(code,
+ Protected Async Function TestGenericNameExtender_GetImplTypeGenericName(code As XElement, index As Integer, expected As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, GenericNameExtender_GetImplTypeGenericName(codeElement, index))
End Sub)
- End Sub
+ End Function
- Protected Sub TestGenericNameExtender_GetImplTypeGenericNameThrows(Of TException As Exception)(code As XElement, index As Integer)
- TestElement(code,
+ Protected Async Function TestGenericNameExtender_GetImplTypeGenericNameThrows(Of TException As Exception)(code As XElement, index As Integer) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() GenericNameExtender_GetImplTypeGenericName(codeElement, index))
End Sub)
- End Sub
+ End Function
- Protected Sub TestAddBase(code As XElement, base As Object, position As Object, expectedCode As XElement)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestAddBase(code As XElement, base As Object, position As Object, expectedCode As XElement) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
AddBase(codeElement, base, position)
End Sub)
- End Sub
+ End Function
- Protected Sub TestAddBaseThrows(Of TException As Exception)(code As XElement, base As Object, position As Object)
- TestElement(code,
+ Protected Async Function TestAddBaseThrows(Of TException As Exception)(code As XElement, base As Object, position As Object) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() AddBase(codeElement, base, position))
End Sub)
- End Sub
+ End Function
- Protected Sub TestRemoveBase(code As XElement, element As Object, expectedCode As XElement)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestRemoveBase(code As XElement, element As Object, expectedCode As XElement) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
RemoveBase(codeElement, element)
End Sub)
- End Sub
+ End Function
- Protected Sub TestRemoveBaseThrows(Of TException As Exception)(code As XElement, element As Object)
- TestElement(code,
+ Protected Async Function TestRemoveBaseThrows(Of TException As Exception)(code As XElement, element As Object) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() RemoveBase(codeElement, element))
End Sub)
- End Sub
+ End Function
- Protected Sub TestAddImplementedInterface(code As XElement, base As Object, position As Object, expectedCode As XElement)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestAddImplementedInterface(code As XElement, base As Object, position As Object, expectedCode As XElement) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
AddImplementedInterface(codeElement, base, position)
End Sub)
- End Sub
+ End Function
- Protected Sub TestAddImplementedInterfaceThrows(Of TException As Exception)(code As XElement, base As Object, position As Object)
- TestElement(code,
+ Protected Async Function TestAddImplementedInterfaceThrows(Of TException As Exception)(code As XElement, base As Object, position As Object) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() AddImplementedInterface(codeElement, base, position))
End Sub)
- End Sub
+ End Function
- Protected Sub TestRemoveImplementedInterface(code As XElement, element As Object, expectedCode As XElement)
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestRemoveImplementedInterface(code As XElement, element As Object, expectedCode As XElement) As Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
RemoveImplementedInterface(codeElement, element)
End Sub)
- End Sub
+ End Function
- Protected Sub TestRemoveImplementedInterfaceThrows(Of TException As Exception)(code As XElement, element As Object)
- TestElement(code,
+ Protected Async Function TestRemoveImplementedInterfaceThrows(Of TException As Exception)(code As XElement, element As Object) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Throws(Of TException)(Sub() RemoveImplementedInterface(codeElement, element))
End Sub)
- End Sub
+ End Function
- Protected Sub TestAllParameterNames(code As XElement, ParamArray expectedParameterNames() As String)
- TestElement(code,
+ Protected Async Function TestAllParameterNames(code As XElement, ParamArray expectedParameterNames() As String) As Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim parameters = GetParameters(codeElement)
Assert.NotNull(parameters)
@@ -1063,7 +1063,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
TestAllParameterNamesByName(parameters, expectedParameterNames)
End If
End Sub)
- End Sub
+ End Function
Private Sub TestAllParameterNamesByName(parameters As EnvDTE.CodeElements, expectedParameterNames() As String)
For index = 0 To expectedParameterNames.Count() - 1
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeEventTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeEventTests.vb
index 557247d58d38d99cdc76413fa0a71cb86fc5053d..aad4f3b044e0b61ffc9abddb8a0719224b6e152d 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeEventTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeEventTests.vb
@@ -72,12 +72,12 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Return codeElement.AddAttribute(data.Name, data.Value, data.Position)
End Function
- Protected Sub TestIsPropertyStyleEvent(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestIsPropertyStyleEvent(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, codeElement.IsPropertyStyleEvent)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeFunctionTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeFunctionTests.vb
index ea624a87f58d286bbd3dc5aa955f5023114b084c..bca37c6f91e2ef9d0c04639cdcf48152768a82e6 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeFunctionTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeFunctionTests.vb
@@ -130,34 +130,34 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Throw New NotSupportedException
End Function
- Protected Sub TestCanOverride(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestCanOverride(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, codeElement.CanOverride)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetCanOverride(code As XElement, expectedCode As XElement, value As Boolean)
- TestSetCanOverride(code, expectedCode, value, NoThrow(Of Boolean)())
- End Sub
+ Protected Async Function TestSetCanOverride(code As XElement, expectedCode As XElement, value As Boolean) As Threading.Tasks.Task
+ Await TestSetCanOverride(code, expectedCode, value, NoThrow(Of Boolean)())
+ End Function
- Protected Sub TestSetCanOverride(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetCanOverride(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean)) As Threading.Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
action(value, Sub(v) codeElement.CanOverride = v)
End Sub)
- End Sub
+ End Function
- Protected Sub TestIsOverloaded(code As XElement, expectedOverloaded As Boolean)
- TestElement(code,
+ Protected Async Function TestIsOverloaded(code As XElement, expectedOverloaded As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim overloaded = GetIsOverloaded(codeElement)
Assert.Equal(expectedOverloaded, overloaded)
End Sub)
- End Sub
+ End Function
- Protected Sub TestOverloadsUniqueSignatures(code As XElement, ParamArray expectedOverloadNames As String())
- TestElement(code,
+ Protected Async Function TestOverloadsUniqueSignatures(code As XElement, ParamArray expectedOverloadNames As String()) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Dim actualOverloads = GetOverloads(codeElement)
Assert.Equal(expectedOverloadNames.Count, actualOverloads.Count)
@@ -167,49 +167,49 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.True(expectedOverloadNames.Contains(signature))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestFunctionKind(code As XElement, expected As EnvDTE.vsCMFunction)
- TestElement(code,
+ Protected Async Function TestFunctionKind(code As XElement, expected As EnvDTE.vsCMFunction) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, codeElement.FunctionKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestFunctionKind(code As XElement, expected As EnvDTE80.vsCMFunction2)
- TestElement(code,
+ Protected Async Function TestFunctionKind(code As XElement, expected As EnvDTE80.vsCMFunction2) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, CType(codeElement.FunctionKind, EnvDTE80.vsCMFunction2))
End Sub)
- End Sub
+ End Function
- Protected Sub TestExtensionMethodExtender_IsExtension(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestExtensionMethodExtender_IsExtension(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, ExtensionMethodExtender_GetIsExtension(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestPartialMethodExtender_IsPartial(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestPartialMethodExtender_IsPartial(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, PartialMethodExtender_GetIsPartial(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestPartialMethodExtender_IsDeclaration(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestPartialMethodExtender_IsDeclaration(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, PartialMethodExtender_GetIsDeclaration(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestPartialMethodExtender_HasOtherPart(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestPartialMethodExtender_HasOtherPart(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, PartialMethodExtender_GetHasOtherPart(codeElement))
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeImportTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeImportTests.vb
index 57afb2c42f144e5abd8b5a37b27d4db2dc9f2c78..154f40766f9d9a63779dc039c4025ab1e9811b82 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeImportTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeImportTests.vb
@@ -36,12 +36,12 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Return Sub(value) codeElement.Name = value
End Function
- Protected Sub TestNamespace(code As XElement, expectedNamespace As String)
- TestElement(code,
+ Protected Async Function TestNamespace(code As XElement, expectedNamespace As String) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expectedNamespace, codeElement.Namespace)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeModelObjectTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeModelObjectTests.vb
index f65a1ffb3bfe47e0711d71d87597fd03a6185cfb..3d7e0419ff5a5a0b05fc9b3250171ef55e15be66 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeModelObjectTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeModelObjectTests.vb
@@ -13,65 +13,65 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
End Function
- Protected Overridable Sub TestAddAttribute(code As XElement, expectedCode As XElement, data As AttributeData)
+ Protected Overridable Function TestAddAttribute(code As XElement, expectedCode As XElement, data As AttributeData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddClass(code As XElement, expectedCode As XElement, data As ClassData)
+ Protected Overridable Function TestAddClass(code As XElement, expectedCode As XElement, data As ClassData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddDelegate(code As XElement, expectedCode As XElement, data As DelegateData)
+ Protected Overridable Function TestAddDelegate(code As XElement, expectedCode As XElement, data As DelegateData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddEnum(code As XElement, expectedCode As XElement, data As EnumData)
+ Protected Overridable Function TestAddEnum(code As XElement, expectedCode As XElement, data As EnumData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddEnumMember(code As XElement, expectedCode As XElement, data As EnumMemberData)
+ Protected Overridable Function TestAddEnumMember(code As XElement, expectedCode As XElement, data As EnumMemberData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddEvent(code As XElement, expectedCode As XElement, data As EventData)
+ Protected Overridable Function TestAddEvent(code As XElement, expectedCode As XElement, data As EventData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddFunction(code As XElement, expectedCode As XElement, data As FunctionData)
+ Protected Overridable Function TestAddFunction(code As XElement, expectedCode As XElement, data As FunctionData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddImport(code As XElement, expectedCode As XElement, data As ImportData)
+ Protected Overridable Function TestAddImport(code As XElement, expectedCode As XElement, data As ImportData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddInterface(code As XElement, expectedCode As XElement, data As InterfaceData)
+ Protected Overridable Function TestAddInterface(code As XElement, expectedCode As XElement, data As InterfaceData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddNamespace(code As XElement, expectedCode As XElement, data As NamespaceData)
+ Protected Overridable Function TestAddNamespace(code As XElement, expectedCode As XElement, data As NamespaceData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddParameter(code As XElement, expectedCode As XElement, data As ParameterData)
+ Protected Overridable Function TestAddParameter(code As XElement, expectedCode As XElement, data As ParameterData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddProperty(code As XElement, expectedCode As XElement, data As PropertyData)
+ Protected Overridable Function TestAddProperty(code As XElement, expectedCode As XElement, data As PropertyData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddStruct(code As XElement, expectedCode As XElement, data As StructData)
+ Protected Overridable Function TestAddStruct(code As XElement, expectedCode As XElement, data As StructData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestAddVariable(code As XElement, expectedCode As XElement, data As VariableData)
+ Protected Overridable Function TestAddVariable(code As XElement, expectedCode As XElement, data As VariableData) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
- Protected Overridable Sub TestRemoveChild(code As XElement, expectedCode As XElement, child As Object)
+ Protected Overridable Function TestRemoveChild(code As XElement, expectedCode As XElement, child As Object) As Threading.Tasks.Task
Throw New NotImplementedException
- End Sub
+ End Function
Protected Sub TestCodeTypeRef(codeTypeRef As EnvDTE.CodeTypeRef, data As CodeTypeRefData)
Assert.NotNull(codeTypeRef)
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeParameterTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeParameterTests.vb
index 17293d7fd1fb185f47d3b5f844c28ca6b86c1b7b..181ae85288e34c4045d04be083b2c6b6fccbbe1c 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeParameterTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeParameterTests.vb
@@ -64,42 +64,42 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Return codeElement.AddAttribute(data.Name, data.Value, data.Position)
End Function
- Protected Sub TestParameterKind(code As XElement, kind As vsCMParameterKind)
- TestElement(code,
+ Protected Async Function TestParameterKind(code As XElement, kind As vsCMParameterKind) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(kind, codeElement.ParameterKind)
End Sub)
- End Sub
+ End Function
- Protected Sub TestDefaultValue(code As XElement, expectedValue As String)
- TestElement(code,
+ Protected Async Function TestDefaultValue(code As XElement, expectedValue As String) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expectedValue, codeElement.DefaultValue)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetParameterKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMParameterKind)
- TestSetParameterKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMParameterKind)())
- End Sub
+ Protected Async Function TestSetParameterKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMParameterKind) As Threading.Tasks.Task
+ Await TestSetParameterKind(code, expectedCode, kind, NoThrow(Of EnvDTE80.vsCMParameterKind)())
+ End Function
- Protected Sub TestSetParameterKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMParameterKind, action As SetterAction(Of EnvDTE80.vsCMParameterKind))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetParameterKind(code As XElement, expectedCode As XElement, kind As EnvDTE80.vsCMParameterKind, action As SetterAction(Of EnvDTE80.vsCMParameterKind)) As Threading.Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim parameterKindSetter = GetParameterKindSetter(codeElement)
action(kind, parameterKindSetter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetDefaultValue(code As XElement, expected As XElement, defaultValue As String)
- TestSetDefaultValue(code, expected, defaultValue, NoThrow(Of String)())
- End Sub
+ Protected Async Function TestSetDefaultValue(code As XElement, expected As XElement, defaultValue As String) As Threading.Tasks.Task
+ Await TestSetDefaultValue(code, expected, defaultValue, NoThrow(Of String)())
+ End Function
- Protected Sub TestSetDefaultValue(code As XElement, expectedCode As XElement, defaultValue As String, action As SetterAction(Of String))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetDefaultValue(code As XElement, expectedCode As XElement, defaultValue As String, action As SetterAction(Of String)) As Threading.Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
Dim defaultValueSetter = GetDefaultValueSetter(codeElement)
action(defaultValue, defaultValueSetter)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodePropertyTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodePropertyTests.vb
index d44d0ccbddc43f15c5bdc812e1b33f4ff210fde5..a12a1f87dd6a113f4ef58027833a92d18872c6b8 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodePropertyTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodePropertyTests.vb
@@ -100,26 +100,26 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Throw New NotSupportedException
End Function
- Protected Sub TestAutoImplementedPropertyExtender_IsAutoImplemented(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestAutoImplementedPropertyExtender_IsAutoImplemented(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, AutoImplementedPropertyExtender_GetIsAutoImplemented(codeElement))
End Sub)
- End Sub
+ End Function
- Protected Sub TestGetter(code As XElement, verifier As Action(Of EnvDTE.CodeFunction))
- TestElement(code,
+ Protected Async Function TestGetter(code As XElement, verifier As Action(Of EnvDTE.CodeFunction)) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
verifier(codeElement.Getter)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetter(code As XElement, verifier As Action(Of EnvDTE.CodeFunction))
- TestElement(code,
+ Protected Async Function TestSetter(code As XElement, verifier As Action(Of EnvDTE.CodeFunction)) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
verifier(codeElement.Setter)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeVariableTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeVariableTests.vb
index 99effd9c1d142ae2c2460e37efc2379c67061b3f..4eda0688c2dee3d178f5d5a847cdc77391f3711e 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractCodeVariableTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractCodeVariableTests.vb
@@ -94,41 +94,41 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Return Sub(value) codeElement.Type = value
End Function
- Protected Sub TestIsConstant(code As XElement, expected As Boolean)
- TestElement(code,
+ Protected Async Function TestIsConstant(code As XElement, expected As Boolean) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, codeElement.IsConstant)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetIsConstant(code As XElement, expectedCode As XElement, value As Boolean)
- TestSetIsConstant(code, expectedCode, value, NoThrow(Of Boolean)())
- End Sub
+ Protected Async Function TestSetIsConstant(code As XElement, expectedCode As XElement, value As Boolean) As Threading.Tasks.Task
+ Await TestSetIsConstant(code, expectedCode, value, NoThrow(Of Boolean)())
+ End Function
- Protected Sub TestSetIsConstant(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetIsConstant(code As XElement, expectedCode As XElement, value As Boolean, action As SetterAction(Of Boolean)) As Threading.Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
action(value, Sub(v) codeElement.IsConstant = v)
End Sub)
- End Sub
+ End Function
- Protected Sub TestInitExpression(code As XElement, expected As Object)
- TestElement(code,
+ Protected Async Function TestInitExpression(code As XElement, expected As Object) As Threading.Tasks.Task
+ Await TestElement(code,
Sub(codeElement)
Assert.Equal(expected, codeElement.InitExpression)
End Sub)
- End Sub
+ End Function
- Protected Sub TestSetInitExpression(code As XElement, expectedCode As XElement, value As Object)
- TestSetInitExpression(code, expectedCode, value, NoThrow(Of Object)())
- End Sub
+ Protected Async Function TestSetInitExpression(code As XElement, expectedCode As XElement, value As Object) As Threading.Tasks.Task
+ Await TestSetInitExpression(code, expectedCode, value, NoThrow(Of Object)())
+ End Function
- Protected Sub TestSetInitExpression(code As XElement, expectedCode As XElement, value As Object, action As SetterAction(Of Object))
- TestElementUpdate(code, expectedCode,
+ Protected Async Function TestSetInitExpression(code As XElement, expectedCode As XElement, value As Object, action As SetterAction(Of Object)) As Threading.Tasks.Task
+ Await TestElementUpdate(code, expectedCode,
Sub(codeElement)
action(value, Sub(v) codeElement.InitExpression = v)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractEventCollectorTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractEventCollectorTests.vb
index dae4ab2da7a0de025dc9f5914fc54bbfe790acea..900d02d58f810451d454b8c7dc3fcac02aef34f1 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractEventCollectorTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractEventCollectorTests.vb
@@ -85,7 +85,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
End If
End Sub
- Friend Sub Test(code As XElement, change As XElement, ParamArray expectedEvents As Action(Of CodeModelEvent, ICodeModelService)())
+ Friend Async Function TestAsync(code As XElement, change As XElement, ParamArray expectedEvents As Action(Of CodeModelEvent, ICodeModelService)()) As Threading.Tasks.Task
Dim definition =
CommonReferences="true">
@@ -94,7 +94,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
- Using workspace = TestWorkspaceFactory.CreateWorkspace(definition, exportProvider:=VisualStudioTestExportProvider.ExportProvider)
+ Using workspace = Await TestWorkspaceFactory.CreateWorkspaceAsync(definition, exportProvider:=VisualStudioTestExportProvider.ExportProvider)
Dim project = workspace.CurrentSolution.Projects.First()
Dim codeModelService = project.LanguageServices.GetService(Of ICodeModelService)()
Assert.NotNull(codeModelService)
@@ -114,7 +114,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedEvent(collectedEvent, codeModelService)
Next
End Using
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractFileCodeModelTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractFileCodeModelTests.vb
index 41b03ab3d76dc63941f0826037fd42664432dca1..1b79a14ea2b06c73b70aa3a798eb10b2eb965b4c 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractFileCodeModelTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractFileCodeModelTests.vb
@@ -7,8 +7,8 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Public MustInherit Class AbstractFileCodeModelTests
Inherits AbstractCodeModelObjectTests(Of EnvDTE80.FileCodeModel2)
- Protected Sub TestOperation(code As XElement, expectedCode As XElement, operation As Action(Of EnvDTE80.FileCodeModel2))
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Protected Async Function TestOperation(code As XElement, expectedCode As XElement, operation As Action(Of EnvDTE80.FileCodeModel2)) As Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim fileCodeModel = state.FileCodeModel
Assert.NotNull(fileCodeModel)
@@ -19,7 +19,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Equal(expectedCode.NormalizedValue.Trim(), text.Trim())
End Using
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim fileCodeModel = state.FileCodeModel
Assert.NotNull(fileCodeModel)
@@ -31,17 +31,17 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Equal(expectedCode.NormalizedValue.Trim(), text.Trim())
End Using
- End Sub
+ End Function
- Protected Sub TestOperation(code As XElement, operation As Action(Of EnvDTE80.FileCodeModel2))
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Protected Async Function TestOperation(code As XElement, operation As Action(Of EnvDTE80.FileCodeModel2)) As Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim fileCodeModel = state.FileCodeModel
Assert.NotNull(fileCodeModel)
operation(fileCodeModel)
End Using
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim fileCodeModel = state.FileCodeModel
Assert.NotNull(fileCodeModel)
@@ -49,56 +49,56 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
operation(fileCodeModel)
fileCodeModel.EndBatch()
End Using
- End Sub
+ End Function
- Protected Overrides Sub TestAddAttribute(code As XElement, expectedCode As XElement, data As AttributeData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddAttribute(code As XElement, expectedCode As XElement, data As AttributeData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newAttribute = fileCodeModel.AddAttribute(data.Name, data.Value, data.Position)
Assert.NotNull(newAttribute)
Assert.Equal(data.Name, newAttribute.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddClass(code As XElement, expectedCode As XElement, data As ClassData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddClass(code As XElement, expectedCode As XElement, data As ClassData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newClass = fileCodeModel.AddClass(data.Name, data.Position, data.Bases, data.ImplementedInterfaces, data.Access)
Assert.NotNull(newClass)
Assert.Equal(data.Name, newClass.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddDelegate(code As XElement, expectedCode As XElement, data As DelegateData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddDelegate(code As XElement, expectedCode As XElement, data As DelegateData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newDelegate = fileCodeModel.AddDelegate(data.Name, data.Type, data.Position, data.Access)
Assert.NotNull(newDelegate)
Assert.Equal(data.Name, newDelegate.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddEnum(code As XElement, expectedCode As XElement, data As EnumData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddEnum(code As XElement, expectedCode As XElement, data As EnumData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newEnum = fileCodeModel.AddEnum(data.Name, data.Position, data.Base, data.Access)
Assert.NotNull(newEnum)
Assert.Equal(data.Name, newEnum.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddFunction(code As XElement, expectedCode As XElement, data As FunctionData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddFunction(code As XElement, expectedCode As XElement, data As FunctionData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Assert.Throws(Of System.Runtime.InteropServices.COMException)(
Sub()
fileCodeModel.AddFunction(data.Name, data.Kind, data.Type, data.Position, data.Access)
End Sub)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddImport(code As XElement, expectedCode As XElement, data As ImportData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddImport(code As XElement, expectedCode As XElement, data As ImportData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newImport = fileCodeModel.AddImport(data.Namespace, data.Position, data.Alias)
Assert.NotNull(newImport)
@@ -108,51 +108,51 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Equal(data.Alias, newImport.Alias)
End If
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddInterface(code As XElement, expectedCode As XElement, data As InterfaceData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddInterface(code As XElement, expectedCode As XElement, data As InterfaceData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newInterface = fileCodeModel.AddInterface(data.Name, data.Position, data.Bases, data.Access)
Assert.NotNull(newInterface)
Assert.Equal(data.Name, newInterface.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddNamespace(code As XElement, expectedCode As XElement, data As NamespaceData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddNamespace(code As XElement, expectedCode As XElement, data As NamespaceData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newNamespace = fileCodeModel.AddNamespace(data.Name, data.Position)
Assert.NotNull(newNamespace)
Assert.Equal(data.Name, newNamespace.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddStruct(code As XElement, expectedCode As XElement, data As StructData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddStruct(code As XElement, expectedCode As XElement, data As StructData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Dim newStruct = fileCodeModel.AddStruct(data.Name, data.Position, data.Bases, data.ImplementedInterfaces, data.Access)
Assert.NotNull(newStruct)
Assert.Equal(data.Name, newStruct.Name)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestAddVariable(code As XElement, expectedCode As XElement, data As VariableData)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestAddVariable(code As XElement, expectedCode As XElement, data As VariableData) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
Assert.Throws(Of System.Runtime.InteropServices.COMException)(
Sub()
fileCodeModel.AddVariable(data.Name, data.Type, data.Position, data.Access)
End Sub)
End Sub)
- End Sub
+ End Function
- Protected Overrides Sub TestRemoveChild(code As XElement, expectedCode As XElement, element As Object)
- TestOperation(code, expectedCode,
+ Protected Overrides Async Function TestRemoveChild(code As XElement, expectedCode As XElement, element As Object) As Tasks.Task
+ Await TestOperation(code, expectedCode,
Sub(fileCodeModel)
fileCodeModel.Remove(element)
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/AbstractRootCodeModelTests.vb b/src/VisualStudio/Core/Test/CodeModel/AbstractRootCodeModelTests.vb
index 40b378a8d3c23d45e53a07f5aa0a94a888060571..f2523e6c4047b0a1c96a24316c4d948e04375968 100644
--- a/src/VisualStudio/Core/Test/CodeModel/AbstractRootCodeModelTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/AbstractRootCodeModelTests.vb
@@ -4,26 +4,26 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Public MustInherit Class AbstractRootCodeModelTests
Inherits AbstractCodeModelObjectTests(Of EnvDTE80.CodeModel2)
- Protected Sub TestRootCodeModel(workspaceDefinition As XElement, action As Action(Of EnvDTE80.CodeModel2))
- Using state = CreateCodeModelTestState(workspaceDefinition)
+ Protected Async Function TestRootCodeModel(workspaceDefinition As XElement, action As Action(Of EnvDTE80.CodeModel2)) As Threading.Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(workspaceDefinition)
Dim rootCodeModel = TryCast(state.RootCodeModel, EnvDTE80.CodeModel2)
Assert.NotNull(rootCodeModel)
action(rootCodeModel)
End Using
- End Sub
+ End Function
- Protected Sub TestRootCodeModelWithCodeFile(code As XElement, action As Action(Of EnvDTE80.CodeModel2))
- Using state = CreateCodeModelTestState(GetWorkspaceDefinition(code))
+ Protected Async Function TestRootCodeModelWithCodeFile(code As XElement, action As Action(Of EnvDTE80.CodeModel2)) As Threading.Tasks.Task
+ Using state = Await CreateCodeModelTestStateAsync(GetWorkspaceDefinition(code))
Dim rootCodeModel = TryCast(state.RootCodeModel, EnvDTE80.CodeModel2)
Assert.NotNull(rootCodeModel)
action(rootCodeModel)
End Using
- End Sub
+ End Function
- Protected Sub TestCodeElements(code As XElement, ParamArray expectedChildren() As Action(Of Object))
- TestRootCodeModelWithCodeFile(code,
+ Protected Async Function TestCodeElements(code As XElement, ParamArray expectedChildren() As Action(Of Object)) As Threading.Tasks.Task
+ Await TestRootCodeModelWithCodeFile(code,
Sub(rootCodeModel)
Dim codeElements = rootCodeModel.CodeElements
Assert.Equal(expectedChildren.Length, rootCodeModel.CodeElements.Count)
@@ -32,10 +32,10 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
expectedChildren(i - 1)(codeElements.Item(i))
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestCodeElements(code As XElement, ParamArray names() As String)
- TestRootCodeModelWithCodeFile(code,
+ Protected Async Function TestCodeElements(code As XElement, ParamArray names() As String) As Threading.Tasks.Task
+ Await TestRootCodeModelWithCodeFile(code,
Sub(rootCodeModel)
Assert.Equal(names.Length, rootCodeModel.CodeElements.Count)
@@ -45,41 +45,41 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel
Assert.Contains(names(i), actualNames)
Next
End Sub)
- End Sub
+ End Function
- Protected Sub TestCreateCodeTypeRef(type As Object, data As CodeTypeRefData)
- TestCreateCodeTypeRef(
, type, data)
- End Sub
+ Protected Async Function TestCreateCodeTypeRef(type As Object, data As CodeTypeRefData) As Threading.Tasks.Task
+ Await TestCreateCodeTypeRef(
, type, data)
+ End Function
- Protected Sub TestCreateCodeTypeRef(code As XElement, type As Object, data As CodeTypeRefData)
- TestRootCodeModelWithCodeFile(code,
+ Protected Async Function TestCreateCodeTypeRef(code As XElement, type As Object, data As CodeTypeRefData) As Threading.Tasks.Task
+ Await TestRootCodeModelWithCodeFile(code,
Sub(rootCodeModel)
Dim codeTypeRef = rootCodeModel.CreateCodeTypeRef(type)
TestCodeTypeRef(codeTypeRef, data)
End Sub)
- End Sub
+ End Function
- Protected Sub TestCreateCodeTypeRefThrows(Of TException As Exception)(type As Object)
- TestCreateCodeTypeRef(Of TException)(
, type)
- End Sub
+ Protected Async Function TestCreateCodeTypeRefThrows(Of TException As Exception)(type As Object) As Threading.Tasks.Task
+ Await TestCreateCodeTypeRef(Of TException)(
, type)
+ End Function
- Protected Sub TestCreateCodeTypeRef(Of TException As Exception)(code As XElement, type As Object)
- TestRootCodeModelWithCodeFile(code,
+ Protected Async Function TestCreateCodeTypeRef(Of TException As Exception)(code As XElement, type As Object) As Threading.Tasks.Task
+ Await TestRootCodeModelWithCodeFile(code,
Sub(rootCodeModel)
Assert.Throws(Of TException)(
Sub()
rootCodeModel.CreateCodeTypeRef(type)
End Sub)
End Sub)
- End Sub
+ End Function
- Protected Sub TestCodeTypeFromFullName(workspaceDefinition As XElement, fullName As String, action As Action(Of EnvDTE.CodeType))
- TestRootCodeModel(workspaceDefinition,
+ Protected Async Function TestCodeTypeFromFullName(workspaceDefinition As XElement, fullName As String, action As Action(Of EnvDTE.CodeType)) As Threading.Tasks.Task
+ Await TestRootCodeModel(workspaceDefinition,
Sub(rootCodeModel)
action(rootCodeModel.CodeTypeFromFullName(fullName))
End Sub)
- End Sub
+ End Function
End Class
End Namespace
diff --git a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAccessorFunctionTests.vb b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAccessorFunctionTests.vb
index f154ceea0792b69597e1ac8c6aaf873ee91c05f8..4274a2a56a9df42d2db6c0d9e18b54d137a7f594 100644
--- a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAccessorFunctionTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAccessorFunctionTests.vb
@@ -1,5 +1,6 @@
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Roslyn.Test.Utilities
@@ -10,7 +11,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel.CSharp
#Region "Access tests"
- Public Sub Access1()
+ Public Async Function TestAccess1() As Task
Dim code =
class C
@@ -28,11 +29,11 @@ class C
}
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPublic)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPublic)
+ End Function
- Public Sub Access2()
+ Public Async Function TestAccess2() As Task
Dim code =
class C
@@ -50,13 +51,13 @@ class C
}
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPrivate)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPrivate)
+ End Function
#End Region
- Public Sub TypeDescriptor_GetProperties()
+ Public Async Function TestTypeDescriptor_GetProperties() As Task
Dim code =
class C
@@ -72,8 +73,8 @@ class C
"IsShared", "MustImplement", "Overloads", "Attributes", "DocComment", "Comment",
"CanOverride", "OverrideKind", "IsGeneric"}
- TestPropertyDescriptors(code, expectedPropertyNames)
- End Sub
+ Await TestPropertyDescriptors(code, expectedPropertyNames)
+ End Function
Protected Overrides ReadOnly Property LanguageName As String
Get
diff --git a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAttributeTests.vb b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAttributeTests.vb
index 7a5c54918186acf711eb2204149567a337236ab1..15daab7e8e1fe300f96e1103eb04948bb2e772cd 100644
--- a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAttributeTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeAttributeTests.vb
@@ -1,5 +1,6 @@
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Roslyn.Test.Utilities
@@ -10,7 +11,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel.CSharp
#Region "GetStartPoint() tests"
- Public Sub GetStartPoint1()
+ Public Async Function TestGetStartPoint1() As Task
Dim code =
using System;
@@ -18,7 +19,7 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel.CSharp
class C { }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -40,10 +41,10 @@ class C { }
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=2, absoluteOffset:=17, lineLength:=14)))
- End Sub
+ End Function
- Public Sub GetStartPoint2()
+ Public Async Function TestGetStartPoint2() As Task
Dim code =
using System;
@@ -51,7 +52,7 @@ class C { }
class C { }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -73,7 +74,7 @@ class C { }
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=2, absoluteOffset:=17, lineLength:=20)))
- End Sub
+ End Function
#End Region
@@ -81,7 +82,7 @@ class C { }
#Region "GetEndPoint() tests"
- Public Sub GetEndPoint1()
+ Public Async Function TestGetEndPoint1() As Task
Dim code =
using System;
@@ -89,7 +90,7 @@ class C { }
class C { }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -111,10 +112,10 @@ class C { }
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=14, absoluteOffset:=29, lineLength:=14)))
- End Sub
+ End Function
- Public Sub GetEndPoint2()
+ Public Async Function TestGetEndPoint2() As Task
Dim code =
using System;
@@ -122,7 +123,7 @@ class C { }
class C { }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -144,14 +145,14 @@ class C { }
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=20, absoluteOffset:=35, lineLength:=20)))
- End Sub
+ End Function
#End Region
#Region "AttributeArgument GetStartPoint() tests"
- Public Sub GetAttributeArgumentStartPoint1()
+ Public Async Function TestGetAttributeArgumentStartPoint1() As Task
Dim code =
using System;
@@ -166,7 +167,7 @@ class FooAttribute : Attribute
}
- TestAttributeArgumentStartPoint(code, 1,
+ Await TestAttributeArgumentStartPoint(code, 1,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -187,10 +188,10 @@ class FooAttribute : Attribute
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=16, absoluteOffset:=31, lineLength:=33)))
- End Sub
+ End Function
- Public Sub GetAttributeArgumentStartPoint2()
+ Public Async Function TestGetAttributeArgumentStartPoint2() As Task
Dim code =
using System;
@@ -205,7 +206,7 @@ class FooAttribute : Attribute
}
- TestAttributeArgumentStartPoint(code, 2,
+ Await TestAttributeArgumentStartPoint(code, 2,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -226,10 +227,10 @@ class FooAttribute : Attribute
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=19, absoluteOffset:=34, lineLength:=33)))
- End Sub
+ End Function
- Public Sub GetAttributeArgumentStartPoint3()
+ Public Async Function TestGetAttributeArgumentStartPoint3() As Task
Dim code =
using System;
@@ -244,7 +245,7 @@ class FooAttribute : Attribute
}
- TestAttributeArgumentStartPoint(code, 3,
+ Await TestAttributeArgumentStartPoint(code, 3,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -265,14 +266,14 @@ class FooAttribute : Attribute
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=26, absoluteOffset:=41, lineLength:=33)))
- End Sub
+ End Function
#End Region
#Region "AttributeArgument GetEndPoint() tests"
- Public Sub GetAttributeArgumentEndPoint1()
+ Public Async Function TestGetAttributeArgumentEndPoint1() As Task
Dim code =
using System;
@@ -288,7 +289,7 @@ class FooAttribute : Attribute
End Class
- TestAttributeArgumentEndPoint(code, 1,
+ Await TestAttributeArgumentEndPoint(code, 1,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -309,10 +310,10 @@ End Class
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=17, absoluteOffset:=32, lineLength:=33)))
- End Sub
+ End Function
- Public Sub GetAttributeArgumentEndPoint2()
+ Public Async Function TestGetAttributeArgumentEndPoint2() As Task
Dim code =
using System;
@@ -328,7 +329,7 @@ class FooAttribute : Attribute
End Class
- TestAttributeArgumentEndPoint(code, 2,
+ Await TestAttributeArgumentEndPoint(code, 2,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -349,10 +350,10 @@ End Class
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=24, absoluteOffset:=39, lineLength:=33)))
- End Sub
+ End Function
- Public Sub GetAttributeArgumentEndPoint3()
+ Public Async Function TestGetAttributeArgumentEndPoint3() As Task
Dim code =
using System;
@@ -368,7 +369,7 @@ class FooAttribute : Attribute
End Class
- TestAttributeArgumentEndPoint(code, 3,
+ Await TestAttributeArgumentEndPoint(code, 3,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -389,13 +390,13 @@ End Class
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=32, absoluteOffset:=47, lineLength:=33)))
- End Sub
+ End Function
#End Region
#Region "FullName tests"
- Public Sub GetFullName1()
+ Public Async Function TestGetFullName1() As Task
Dim code =
using System;
@@ -404,25 +405,25 @@ using System;
class C { }
- TestFullName(code, "System.SerializableAttribute")
- End Sub
+ Await TestFullName(code, "System.SerializableAttribute")
+ End Function
- Public Sub GetFullName2()
+ Public Async Function TestGetFullName2() As Task
Dim code =
[$$System.Serializable]
class C { }
- TestFullName(code, "System.SerializableAttribute")
- End Sub
+ Await TestFullName(code, "System.SerializableAttribute")
+ End Function
#End Region
#Region "Parent tests"
- Public Sub GetParent1()
+ Public Async Function TestGetParent1() As Task
Dim code =
using System;
@@ -431,11 +432,11 @@ using System;
class C { }
- TestParent(code, IsElement("C", kind:=EnvDTE.vsCMElement.vsCMElementClass))
- End Sub
+ Await TestParent(code, IsElement("C", kind:=EnvDTE.vsCMElement.vsCMElementClass))
+ End Function
- Public Sub GetParent2()
+ Public Async Function TestGetParent2() As Task
Dim code =
using System;
@@ -444,13 +445,13 @@ using System;
class C { }
- TestParent(code, IsElement("C", kind:=EnvDTE.vsCMElement.vsCMElementClass))
- End Sub
+ Await TestParent(code, IsElement("C", kind:=EnvDTE.vsCMElement.vsCMElementClass))
+ End Function
#End Region
#Region "Attribute argument tests"
- Public Sub GetArguments1()
+ Public Async Function TestGetArguments1() As Task
Dim code =
using System;
@@ -459,11 +460,11 @@ using System;
class C { }
- TestAttributeArguments(code, NoElements)
- End Sub
+ Await TestAttributeArguments(code, NoElements)
+ End Function
- Public Sub GetArguments2()
+ Public Async Function TestGetArguments2() As Task
Dim code =
using System;
@@ -472,11 +473,11 @@ using System;
class C { }
- TestAttributeArguments(code, NoElements)
- End Sub
+ Await TestAttributeArguments(code, NoElements)
+ End Function
- Public Sub GetArguments3()
+ Public Async Function TestGetArguments3() As Task
Dim code =
using System;
@@ -485,11 +486,11 @@ using System;
class C { }
- TestAttributeArguments(code, IsAttributeArgument(value:="true"))
- End Sub
+ Await TestAttributeArguments(code, IsAttributeArgument(value:="true"))
+ End Function
- Public Sub GetArguments4()
+ Public Async Function TestGetArguments4() As Task
Dim code =
using System;
@@ -498,14 +499,14 @@ using System;
class CAttribute : Attribute { }
- TestAttributeArguments(code, IsAttributeArgument(value:="AttributeTargets.All"), IsAttributeArgument(name:="AllowMultiple", value:="false"))
+ Await TestAttributeArguments(code, IsAttributeArgument(value:="AttributeTargets.All"), IsAttributeArgument(name:="AllowMultiple", value:="false"))
- End Sub
+ End Function
#End Region
#Region "Target tests"
- Public Sub GetTarget1()
+ Public Async Function TestGetTarget1() As Task
Dim code =
using System;
@@ -514,13 +515,13 @@ using System;
class C { }
- TestTarget(code, "type")
- End Sub
+ Await TestTarget(code, "type")
+ End Function
#End Region
#Region "Value tests"
- Public Sub GetValue1()
+ Public Async Function TestGetValue1() As Task
Dim code =
using System;
@@ -529,11 +530,11 @@ using System;
class C { }
- TestValue(code, "")
- End Sub
+ Await TestValue(code, "")
+ End Function
- Public Sub GetValue2()
+ Public Async Function TestGetValue2() As Task
Dim code =
using System;
@@ -542,11 +543,11 @@ using System;
class C { }
- TestValue(code, "")
- End Sub
+ Await TestValue(code, "")
+ End Function
- Public Sub GetValue3()
+ Public Async Function TestGetValue3() As Task
Dim code =
using System;
@@ -555,12 +556,12 @@ using System;
class C { }
- TestValue(code, "false")
+ Await TestValue(code, "false")
- End Sub
+ End Function
- Public Sub GetValue4()
+ Public Async Function TestGetValue4() As Task
Dim code =
using System;
@@ -569,13 +570,13 @@ using System;
class CAttribute : Attribute { }
- TestValue(code, "AttributeTargets.All, AllowMultiple=false")
- End Sub
+ Await TestValue(code, "AttributeTargets.All, AllowMultiple=false")
+ End Function
#End Region
#Region "AddAttributeArgument tests"
- Public Sub AddAttributeArgument1()
+ Public Async Function TestAddAttributeArgument1() As Task
Dim code =
using System;
@@ -592,12 +593,12 @@ using System;
class C { }
- TestAddAttributeArgument(code, expectedCode, New AttributeArgumentData With {.Value = "true"})
+ Await TestAddAttributeArgument(code, expectedCode, New AttributeArgumentData With {.Value = "true"})
- End Sub
+ End Function
- Public Sub AddAttributeArgument2()
+ Public Async Function TestAddAttributeArgument2() As Task
Dim code =
using System;
@@ -614,12 +615,12 @@ using System;
class C { }
- TestAddAttributeArgument(code, expectedCode, New AttributeArgumentData With {.Value = "true"})
+ Await TestAddAttributeArgument(code, expectedCode, New AttributeArgumentData With {.Value = "true"})
- End Sub
+ End Function
- Public Sub AddAttributeArgument3()
+ Public Async Function TestAddAttributeArgument3() As Task
Dim code =
using System;
@@ -636,12 +637,12 @@ using System;
class CAttribute : Attribute { }
- TestAddAttributeArgument(code, expectedCode, New AttributeArgumentData With {.Name = "AllowMultiple", .Value = "false", .Position = 1})
+ Await TestAddAttributeArgument(code, expectedCode, New AttributeArgumentData With {.Name = "AllowMultiple", .Value = "false", .Position = 1})
- End Sub
+ End Function
- Public Sub AddAttributeArgumentStress()
+ Public Async Function TestAddAttributeArgumentStress() As Task
Dim code =
[$$A]
@@ -650,21 +651,21 @@ class C
}
- TestElement(code,
+ Await TestElement(code,
Sub(codeAttribute)
For i = 1 To 100
Dim value = i.ToString()
Dim codeAttributeArgument = codeAttribute.AddArgument(value, Position:=1)
Next
End Sub)
- End Sub
+ End Function
#End Region
#Region "Delete tests"
- Public Sub Delete1()
+ Public Async Function TestDelete1() As Task
Dim code =
[$$Foo]
@@ -680,11 +681,11 @@ class C
}
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete2()
+ Public Async Function TestDelete2() As Task
Dim code =
[$$Foo, Bar]
@@ -697,11 +698,11 @@ class C { }
class C { }
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete3()
+ Public Async Function TestDelete3() As Task
Dim code =
[Foo]
@@ -715,11 +716,11 @@ class C { }
class C { }
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete4()
+ Public Async Function TestDelete4() As Task
Dim code =
[assembly: $$Foo]
@@ -729,11 +730,11 @@ class C { }
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete5()
+ Public Async Function TestDelete5() As Task
Dim code =
[assembly: $$Foo, Bar]
@@ -744,11 +745,11 @@ class C { }
[assembly: Bar]
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete6()
+ Public Async Function TestDelete6() As Task
Dim code =
[assembly: Foo]
@@ -760,11 +761,11 @@ class C { }
[assembly: Foo]
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete7()
+ Public Async Function TestDelete7() As Task
Dim code =
@@ -782,11 +783,11 @@ class C { }
class C { }
]]>
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
- Public Sub Delete8()
+ Public Async Function TestDelete8() As Task
Dim code =
- TestDelete(code, expected)
- End Sub
+ Await TestDelete(code, expected)
+ End Function
#End Region
#Region "Delete attribute argument tests"
- Public Sub DeleteAttributeArgument1()
+ Public Async Function TestDeleteAttributeArgument1() As Task
Dim code =
[$$System.CLSCompliant(true)]
@@ -819,11 +820,11 @@ class C { }
class C { }
- TestDeleteAttributeArgument(code, expected, 1)
- End Sub
+ Await TestDeleteAttributeArgument(code, expected, 1)
+ End Function
- Public Sub DeleteAttributeArgument2()
+ Public Async Function TestDeleteAttributeArgument2() As Task
Dim code =
[$$AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
@@ -836,11 +837,11 @@ class CAttribute : Attribute { }
class CAttribute : Attribute { }
- TestDeleteAttributeArgument(code, expected, 1)
- End Sub
+ Await TestDeleteAttributeArgument(code, expected, 1)
+ End Function
- Public Sub DeleteAttributeArgument3()
+ Public Async Function TestDeleteAttributeArgument3() As Task
Dim code =
[$$AttributeUsage(AttributeTargets.All, AllowMultiple = false)]
@@ -853,14 +854,14 @@ class CAttribute : Attribute { }
class CAttribute : Attribute { }
- TestDeleteAttributeArgument(code, expected, 2)
- End Sub
+ Await TestDeleteAttributeArgument(code, expected, 2)
+ End Function
#End Region
#Region "Set Name tests"
- Public Sub SetName1()
+ Public Async Function TestSetName1() As Task
Dim code =
[$$Foo]
@@ -873,13 +874,13 @@ class C { }
class C { }
- TestSetName(code, expected, "Bar", NoThrow(Of String)())
- End Sub
+ Await TestSetName(code, expected, "Bar", NoThrow(Of String)())
+ End Function
#End Region
#Region "Set Target tests"
- Public Sub SetTarget1()
+ Public Async Function TestSetTarget1() As Task
Dim code =
using System;
@@ -896,11 +897,11 @@ using System;
class C { }
- TestSetTarget(code, expected, "assembly")
- End Sub
+ Await TestSetTarget(code, expected, "assembly")
+ End Function
- Public Sub SetTarget2()
+ Public Async Function TestSetTarget2() As Task
Dim code =
using System;
@@ -917,11 +918,11 @@ using System;
class C { }
- TestSetTarget(code, expected, "assembly")
- End Sub
+ Await TestSetTarget(code, expected, "assembly")
+ End Function
- Public Sub SetTarget3()
+ Public Async Function TestSetTarget3() As Task
Dim code =
using System;
@@ -938,13 +939,13 @@ using System;
class C { }
- TestSetTarget(code, expected, "")
- End Sub
+ Await TestSetTarget(code, expected, "")
+ End Function
#End Region
#Region "Set Value tests"
- Public Sub SetValue1()
+ Public Async Function TestSetValue1() As Task
Dim code =
using System;
@@ -961,11 +962,11 @@ using System;
class C { }
- TestSetValue(code, expected, "true")
- End Sub
+ Await TestSetValue(code, expected, "true")
+ End Function
- Public Sub SetValue2()
+ Public Async Function TestSetValue2() As Task
Dim code =
using System;
@@ -982,11 +983,11 @@ using System;
class C { }
- TestSetValue(code, expected, "true")
- End Sub
+ Await TestSetValue(code, expected, "true")
+ End Function
- Public Sub SetValue3()
+ Public Async Function TestSetValue3() As Task
Dim code =
using System;
@@ -1003,11 +1004,11 @@ using System;
class C { }
- TestSetValue(code, expected, "true")
- End Sub
+ Await TestSetValue(code, expected, "true")
+ End Function
- Public Sub SetValue4()
+ Public Async Function TestSetValue4() As Task
Dim code =
using System;
@@ -1024,12 +1025,12 @@ using System;
class C { }
- TestSetValue(code, expected, "")
- End Sub
+ Await TestSetValue(code, expected, "")
+ End Function
#End Region
- Public Sub TypeDescriptor_GetProperties()
+ Public Async Function TestTypeDescriptor_GetProperties() As Task
Dim code =
[$$System.CLSCompliant(true)]
@@ -1043,8 +1044,8 @@ class C
"InfoLocation", "Children", "Language", "StartPoint", "EndPoint", "ExtenderNames",
"ExtenderCATID", "Parent", "Value", "Target", "Arguments"}
- TestPropertyDescriptors(code, expectedPropertyNames)
- End Sub
+ Await TestPropertyDescriptors(code, expectedPropertyNames)
+ End Function
Protected Overrides ReadOnly Property LanguageName As String
Get
diff --git a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeClassTests.vb b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeClassTests.vb
index 7394eae72a7d44a00b9ab202ee54566f196ec7d3..6d6722b23958900e3563723cb372b88e42a84062 100644
--- a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeClassTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeClassTests.vb
@@ -1,5 +1,6 @@
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Roslyn.Test.Utilities
@@ -10,13 +11,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel.CSharp
#Region "GetStartPoint() tests"
- Public Sub GetStartPoint1()
+ Public Async Function TestGetStartPoint1() As Task
Dim code =
class $$C {}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -37,16 +38,16 @@ class $$C {}
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=1, absoluteOffset:=1, lineLength:=10)))
- End Sub
+ End Function
- Public Sub GetStartPoint2()
+ Public Async Function TestGetStartPoint2() As Task
Dim code =
class $$C { }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -67,16 +68,16 @@ class $$C { }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=1, absoluteOffset:=1, lineLength:=11)))
- End Sub
+ End Function
- Public Sub GetStartPoint3()
+ Public Async Function TestGetStartPoint3() As Task
Dim code =
class $$C { }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -97,17 +98,17 @@ class $$C { }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=1, absoluteOffset:=1, lineLength:=12)))
- End Sub
+ End Function
- Public Sub GetStartPoint4()
+ Public Async Function TestGetStartPoint4() As Task
Dim code =
using System;
[CLSCompliant(true)] class $$C { }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -128,10 +129,10 @@ using System;
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=32)))
- End Sub
+ End Function
- Public Sub GetStartPoint5()
+ Public Async Function TestGetStartPoint5() As Task
Dim code =
using System;
@@ -139,7 +140,7 @@ using System;
class $$C { }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -160,10 +161,10 @@ class $$C { }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint6()
+ Public Async Function TestGetStartPoint6() As Task
Dim code =
using System;
@@ -172,7 +173,7 @@ class $$C {
}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -193,10 +194,10 @@ class $$C {
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint7()
+ Public Async Function TestGetStartPoint7() As Task
Dim code =
using System;
@@ -206,7 +207,7 @@ class $$C {
}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -227,10 +228,10 @@ class $$C {
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint8()
+ Public Async Function TestGetStartPoint8() As Task
Dim code =
using System;
@@ -241,7 +242,7 @@ class $$C
}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -262,17 +263,17 @@ class $$C
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint9()
+ Public Async Function TestGetStartPoint9() As Task
Dim code =
using System;
[CLSCompliant(true)]
class $$C {void M() { }}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -293,17 +294,17 @@ class $$C {void M() { }}
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint10()
+ Public Async Function TestGetStartPoint10() As Task
Dim code =
using System;
[CLSCompliant(true)]
class $$C { void M() { } }
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -324,10 +325,10 @@ class $$C { void M() { } }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint11()
+ Public Async Function TestGetStartPoint11() As Task
Dim code =
using System;
@@ -336,7 +337,7 @@ class $$C {
void M() { }
}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -357,10 +358,10 @@ class $$C {
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
- Public Sub GetStartPoint12()
+ Public Async Function TestGetStartPoint12() As Task
Dim code =
using System;
@@ -370,7 +371,7 @@ class $$C
void M() { }
}
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -391,20 +392,20 @@ class $$C
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=1, absoluteOffset:=15, lineLength:=20)))
- End Sub
+ End Function
#End Region
#Region "GetEndPoint() tests"
- Public Sub GetEndPoint1()
+ Public Async Function TestGetEndPoint1() As Task
Dim code =
class $$C {}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -425,16 +426,16 @@ class $$C {}
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=11, absoluteOffset:=11, lineLength:=10)))
- End Sub
+ End Function
- Public Sub GetEndPoint2()
+ Public Async Function TestGetEndPoint2() As Task
Dim code =
class $$C { }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -455,16 +456,16 @@ class $$C { }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=12, absoluteOffset:=12, lineLength:=11)))
- End Sub
+ End Function
- Public Sub GetEndPoint3()
+ Public Async Function TestGetEndPoint3() As Task
Dim code =
class $$C { }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -485,17 +486,17 @@ class $$C { }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=13, absoluteOffset:=13, lineLength:=12)))
- End Sub
+ End Function
- Public Sub GetEndPoint4()
+ Public Async Function TestGetEndPoint4() As Task
Dim code =
using System;
[CLSCompliant(true)] class $$C { }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -516,10 +517,10 @@ using System;
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=33, absoluteOffset:=47, lineLength:=32)))
- End Sub
+ End Function
- Public Sub GetEndPoint5()
+ Public Async Function TestGetEndPoint5() As Task
Dim code =
using System;
@@ -527,7 +528,7 @@ using System;
class $$C { }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -548,10 +549,10 @@ class $$C { }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=12, absoluteOffset:=47, lineLength:=11)))
- End Sub
+ End Function
- Public Sub GetEndPoint6()
+ Public Async Function TestGetEndPoint6() As Task
Dim code =
using System;
@@ -560,7 +561,7 @@ class $$C {
}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -581,10 +582,10 @@ class $$C {
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=4, lineOffset:=2, absoluteOffset:=47, lineLength:=1)))
- End Sub
+ End Function
- Public Sub GetEndPoint7()
+ Public Async Function TestGetEndPoint7() As Task
Dim code =
using System;
@@ -594,7 +595,7 @@ class $$C {
}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -615,10 +616,10 @@ class $$C {
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=5, lineOffset:=2, absoluteOffset:=48, lineLength:=1)))
- End Sub
+ End Function
- Public Sub GetEndPoint8()
+ Public Async Function TestGetEndPoint8() As Task
Dim code =
using System;
@@ -629,7 +630,7 @@ class $$C
}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -650,17 +651,17 @@ class $$C
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=6, lineOffset:=2, absoluteOffset:=48, lineLength:=1)))
- End Sub
+ End Function
- Public Sub GetEndPoint9()
+ Public Async Function TestGetEndPoint9() As Task
Dim code =
using System;
[CLSCompliant(true)]
class $$C {void M() { }}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -681,17 +682,17 @@ class $$C {void M() { }}
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=23, absoluteOffset:=58, lineLength:=22)))
- End Sub
+ End Function
- Public Sub GetEndPoint10()
+ Public Async Function TestGetEndPoint10() As Task
Dim code =
using System;
[CLSCompliant(true)]
class $$C { void M() { } }
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -712,10 +713,10 @@ class $$C { void M() { } }
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=3, lineOffset:=25, absoluteOffset:=60, lineLength:=24)))
- End Sub
+ End Function
- Public Sub GetEndPoint11()
+ Public Async Function TestGetEndPoint11() As Task
Dim code =
using System;
@@ -724,7 +725,7 @@ class $$C {
void M() { }
}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -745,10 +746,10 @@ class $$C {
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=5, lineOffset:=2, absoluteOffset:=64, lineLength:=1)))
- End Sub
+ End Function
- Public Sub GetEndPoint12()
+ Public Async Function TestGetEndPoint12() As Task
Dim code =
using System;
@@ -758,7 +759,7 @@ class $$C
void M() { }
}
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -779,118 +780,118 @@ class $$C
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=6, lineOffset:=2, absoluteOffset:=64, lineLength:=1)))
- End Sub
+ End Function
#End Region
#Region "Access tests"
- Public Sub Access1()
+ Public Async Function TestAccess1() As Task
Dim code =
class $$C { }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProject)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProject)
+ End Function
- Public Sub Access2()
+ Public Async Function TestAccess2() As Task
Dim code =
internal class $$C { }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProject)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProject)
+ End Function
- Public Sub Access3()
+ Public Async Function TestAccess3() As Task
Dim code =
public class $$C { }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPublic)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPublic)
+ End Function
- Public Sub Access4()
+ Public Async Function TestAccess4() As Task
Dim code =
class C { class $$D { } }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPrivate)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPrivate)
+ End Function
- Public Sub Access5()
+ Public Async Function TestAccess5() As Task
Dim code =
class C { private class $$D { } }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPrivate)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPrivate)
+ End Function
- Public Sub Access6()
+ Public Async Function TestAccess6() As Task
Dim code =
class C { protected class $$D { } }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProtected)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProtected)
+ End Function
- Public Sub Access7()
+ Public Async Function TestAccess7() As Task
Dim code =
class C { protected internal class $$D { } }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProjectOrProtected)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProjectOrProtected)
+ End Function
- Public Sub Access8()
+ Public Async Function TestAccess8() As Task
Dim code =
class C { internal class $$D { } }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProject)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessProject)
+ End Function
- Public Sub Access9()
+ Public Async Function TestAccess9() As Task
Dim code =
class C { public class $$D { } }
- TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPublic)
- End Sub
+ Await TestAccess(code, EnvDTE.vsCMAccess.vsCMAccessPublic)
+ End Function
#End Region
#Region "Attributes tests"
- Public Sub Attributes1()
+ Public Async Function TestAttributes1() As Task
Dim code =
class $$C { }
- TestAttributes(code, NoElements)
- End Sub
+ Await TestAttributes(code, NoElements)
+ End Function
- Public Sub Attributes2()
+ Public Async Function TestAttributes2() As Task
Dim code =
using System;
@@ -899,11 +900,11 @@ using System;
class $$C { }
- TestAttributes(code, IsElement("Serializable"))
- End Sub
+ Await TestAttributes(code, IsElement("Serializable"))
+ End Function
- Public Sub Attributes3()
+ Public Async Function TestAttributes3() As Task
Dim code =
using System;
@@ -912,11 +913,11 @@ class $$C { }
class $$C { }
- TestAttributes(code, IsElement("Serializable"), IsElement("CLSCompliant"))
- End Sub
+ Await TestAttributes(code, IsElement("Serializable"), IsElement("CLSCompliant"))
+ End Function
- Public Sub Attributes4()
+ Public Async Function TestAttributes4() As Task
Dim code =
using System;
@@ -924,98 +925,98 @@ class $$C { }
class $$C { }
- TestAttributes(code, IsElement("Serializable"), IsElement("CLSCompliant"))
- End Sub
+ Await TestAttributes(code, IsElement("Serializable"), IsElement("CLSCompliant"))
+ End Function
#End Region
#Region "Bases tests"
- Public Sub Bases1()
+ Public Async Function TestBases1() As Task
Dim code =
class $$C { }
- TestBases(code, IsElement("Object"))
- End Sub
+ Await TestBases(code, IsElement("Object"))
+ End Function
- Public Sub Bases2()
+ Public Async Function TestBases2() As Task
Dim code =
class $$C : object { }
- TestBases(code, IsElement("Object"))
- End Sub
+ Await TestBases(code, IsElement("Object"))
+ End Function
- Public Sub Bases3()
+ Public Async Function TestBases3() As Task
Dim code =
class C { }
class $$D : C { }
- TestBases(code, IsElement("C"))
- End Sub
+ Await TestBases(code, IsElement("C"))
+ End Function
- Public Sub Bases4()
+ Public Async Function TestBases4() As Task
Dim code =
interface I { }
class $$D : I { }
- TestBases(code, IsElement("Object"))
- End Sub
+ Await TestBases(code, IsElement("Object"))
+ End Function
- Public Sub Bases5()
+ Public Async Function TestBases5() As Task
Dim code =
class $$C : System.Collections.Generic.List<int> { }
- TestBases(code, IsElement("List"))
- End Sub
+ Await TestBases(code, IsElement("List"))
+ End Function
#End Region
#Region "Children tests"
- Public Sub Children1()
+ Public Async Function TestChildren1() As Task
Dim code =
class $$C { }
- TestChildren(code, NoElements)
- End Sub
+ Await TestChildren(code, NoElements)
+ End Function
- Public Sub Children2()
+ Public Async Function TestChildren2() As Task
Dim code =
class $$C { void M() { } }
- TestChildren(code, IsElement("M"))
- End Sub
+ Await TestChildren(code, IsElement("M"))
+ End Function
- Public Sub Children3()
+ Public Async Function TestChildren3() As Task
Dim code =
[Obsolete]
class $$C { void M() { } }
- TestChildren(code, IsElement("Obsolete"), IsElement("M"))
- End Sub
+ Await TestChildren(code, IsElement("Obsolete"), IsElement("M"))
+ End Function
#End Region
@@ -1023,7 +1024,7 @@ class $$C { void M() { } }
#Region "ClassKind tests"
- Public Sub ClassKind_MainClass()
+ Public Async Function TestClassKind_MainClass() As Task
Dim code =
class $$C
@@ -1031,11 +1032,11 @@ class $$C
}
- TestClassKind(code, EnvDTE80.vsCMClassKind.vsCMClassKindMainClass)
- End Sub
+ Await TestClassKind(code, EnvDTE80.vsCMClassKind.vsCMClassKindMainClass)
+ End Function
- Public Sub ClassKind_PartialClass()
+ Public Async Function TestClassKind_PartialClass() As Task
Dim code =
partial class $$C
@@ -1043,25 +1044,25 @@ partial class $$C
}
- TestClassKind(code, EnvDTE80.vsCMClassKind.vsCMClassKindPartialClass)
- End Sub
+ Await TestClassKind(code, EnvDTE80.vsCMClassKind.vsCMClassKindPartialClass)
+ End Function
#End Region
#Region "Comment tests"
- Public Sub Comment1()
+ Public Async Function TestComment1() As Task
Dim code =
class $$C { }
- TestComment(code, String.Empty)
- End Sub
+ Await TestComment(code, String.Empty)
+ End Function
- Public Sub Comment2()
+ Public Async Function TestComment2() As Task
Dim code =
// Foo
@@ -1069,11 +1070,11 @@ class $$C { }
class $$C { }
- TestComment(code, "Foo" & vbCrLf & "Bar" & vbCrLf)
- End Sub
+ Await TestComment(code, "Foo" & vbCrLf & "Bar" & vbCrLf)
+ End Function
- Public Sub Comment3()
+ Public Async Function TestComment3() As Task
Dim code =
class B { } // Foo
@@ -1081,11 +1082,11 @@ class B { } // Foo
class $$C { }
- TestComment(code, "Bar" & vbCrLf)
- End Sub
+ Await TestComment(code, "Bar" & vbCrLf)
+ End Function
- Public Sub Comment4()
+ Public Async Function TestComment4() As Task
Dim code =
class B { } // Foo
@@ -1093,11 +1094,11 @@ class B { } // Foo
class $$C { }
- TestComment(code, "Bar" & vbCrLf)
- End Sub
+ Await TestComment(code, "Bar" & vbCrLf)
+ End Function
- Public Sub Comment5()
+ Public Async Function TestComment5() As Task
Dim code =
class B { } // Foo
@@ -1107,11 +1108,11 @@ class B { } // Foo
class $$C { }
- TestComment(code, "Bar" & vbCrLf)
- End Sub
+ Await TestComment(code, "Bar" & vbCrLf)
+ End Function
- Public Sub Comment6()
+ Public Async Function TestComment6() As Task
Dim code =
class B { } // Foo
@@ -1122,11 +1123,11 @@ class B { } // Foo
class $$C { }
- TestComment(code, "Hello" & vbCrLf & "World!" & vbCrLf)
- End Sub
+ Await TestComment(code, "Hello" & vbCrLf & "World!" & vbCrLf)
+ End Function
- Public Sub Comment7()
+ Public Async Function TestComment7() As Task
Dim code =
class B { } // Foo
@@ -1138,11 +1139,11 @@ class B { } // Foo
class $$C { }
- TestComment(code, "Hello" & vbCrLf & vbCrLf & "World!" & vbCrLf)
- End Sub
+ Await TestComment(code, "Hello" & vbCrLf & vbCrLf & "World!" & vbCrLf)
+ End Function
- Public Sub Comment8()
+ Public Async Function TestComment8() As Task
Dim code =
/* This
@@ -1154,11 +1155,11 @@ class $$C { }
class $$C { }
- TestComment(code, "This" & vbCrLf & "is" & vbCrLf & "a" & vbCrLf & "multi-line" & vbCrLf & "comment!" & vbCrLf)
- End Sub
+ Await TestComment(code, "This" & vbCrLf & "is" & vbCrLf & "a" & vbCrLf & "multi-line" & vbCrLf & "comment!" & vbCrLf)
+ End Function
- Public Sub Comment9()
+ Public Async Function TestComment9() As Task
Dim code =
// Foo
@@ -1166,26 +1167,26 @@ class $$C { }
class $$C { }
- TestComment(code, String.Empty)
- End Sub
+ Await TestComment(code, String.Empty)
+ End Function
#End Region
#Region "DocComment tests"
- Public Sub DocComment1()
+ Public Async Function TestDocComment1() As Task
Dim code =
/// <summary>Hello World</summary>
class $$C { }
- TestDocComment(code, "" & vbCrLf & "Hello World" & vbCrLf & "")
- End Sub
+ Await TestDocComment(code, "" & vbCrLf & "Hello World" & vbCrLf & "")
+ End Function
- Public Sub DocComment2()
+ Public Async Function TestDocComment2() As Task
Dim code =
/// <summary>
@@ -1194,11 +1195,11 @@ class $$C { }
class $$C { }
- TestDocComment(code, "" & vbCrLf & "" & vbCrLf & "Hello World" & vbCrLf & "" & vbCrLf & "")
- End Sub
+ Await TestDocComment(code, "" & vbCrLf & "" & vbCrLf & "Hello World" & vbCrLf & "" & vbCrLf & "")
+ End Function
- Public Sub DocComment3()
+ Public Async Function TestDocComment3() As Task
Dim code =
/// <summary>
@@ -1207,11 +1208,11 @@ class $$C { }
class $$C { }
- TestDocComment(code, "" & vbCrLf & " " & vbCrLf & " Hello World" & vbCrLf & "" & vbCrLf & "")
- End Sub
+ Await TestDocComment(code, "" & vbCrLf & " " & vbCrLf & " Hello World" & vbCrLf & "" & vbCrLf & "")
+ End Function
- Public Sub DocComment4()
+ Public Async Function TestDocComment4() As Task
Dim code =
/// <summary>
@@ -1221,15 +1222,15 @@ class $$C { }
class $$C { }
- TestDocComment(code, "" & vbCrLf & "" & vbCrLf & "Summary" & vbCrLf & "" & vbCrLf & "Remarks" & vbCrLf & "")
- End Sub
+ Await TestDocComment(code, "" & vbCrLf & "" & vbCrLf & "Summary" & vbCrLf & "" & vbCrLf & "Remarks" & vbCrLf & "")
+ End Function
#End Region
#Region "InheritanceKind tests"
- Public Sub InheritanceKind_None()
+ Public Async Function TestInheritanceKind_None() As Task
Dim code =
class $$C
@@ -1237,11 +1238,11 @@ class $$C
}
- TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNone)
- End Sub
+ Await TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNone)
+ End Function
- Public Sub InheritanceKind_Abstract()
+ Public Async Function TestInheritanceKind_Abstract() As Task
Dim code =
abstract class $$C
@@ -1249,11 +1250,11 @@ abstract class $$C
}
- TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract)
- End Sub
+ Await TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract)
+ End Function
- Public Sub InheritanceKind_Sealed()
+ Public Async Function TestInheritanceKind_Sealed() As Task
Dim code =
sealed class $$C
@@ -1261,11 +1262,11 @@ sealed class $$C
}
- TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindSealed)
- End Sub
+ Await TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindSealed)
+ End Function
- Public Sub InheritanceKind_New()
+ Public Async Function TestInheritanceKind_New() As Task
Dim code =
class C
@@ -1279,11 +1280,11 @@ class D
}
- TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNew)
- End Sub
+ Await TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNew)
+ End Function
- Public Sub InheritanceKind_AbstractAndNew()
+ Public Async Function TestInheritanceKind_AbstractAndNew() As Task
Dim code =
class C
@@ -1297,15 +1298,15 @@ class D
}
- TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract Or EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNew)
- End Sub
+ Await TestInheritanceKind(code, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract Or EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNew)
+ End Function
#End Region
#Region "IsAbstract tests"
- Public Sub IsAbstract1()
+ Public Async Function TestIsAbstract1() As Task
Dim code =
class $$C
@@ -1313,11 +1314,11 @@ class $$C
}
- TestIsAbstract(code, False)
- End Sub
+ Await TestIsAbstract(code, False)
+ End Function
- Public Sub IsAbstract2()
+ Public Async Function TestIsAbstract2() As Task
Dim code =
abstract class $$C
@@ -1325,11 +1326,11 @@ abstract class $$C
}
- TestIsAbstract(code, True)
- End Sub
+ Await TestIsAbstract(code, True)
+ End Function
- Public Sub IsAbstract3()
+ Public Async Function TestIsAbstract3() As Task
Dim code =
abstract partial class $$C
@@ -1341,11 +1342,11 @@ partial class C
}
- TestIsAbstract(code, True)
- End Sub
+ Await TestIsAbstract(code, True)
+ End Function
- Public Sub IsAbstract4()
+ Public Async Function TestIsAbstract4() As Task
Dim code =
partial class $$C
@@ -1357,15 +1358,15 @@ abstract partial class C
}
- TestIsAbstract(code, False)
- End Sub
+ Await TestIsAbstract(code, False)
+ End Function
#End Region
#Region "IsShared tests"
- Public Sub IsShared1()
+ Public Async Function TestIsShared1() As Task
Dim code =
class $$C
@@ -1373,11 +1374,11 @@ class $$C
}
- TestIsShared(code, False)
- End Sub
+ Await TestIsShared(code, False)
+ End Function
- Public Sub IsShared2()
+ Public Async Function TestIsShared2() As Task
Dim code =
static class $$C
@@ -1385,11 +1386,11 @@ static class $$C
}
- TestIsShared(code, True)
- End Sub
+ Await TestIsShared(code, True)
+ End Function
- Public Sub IsShared3()
+ Public Async Function TestIsShared3() As Task
Dim code =
static partial class $$C
@@ -1401,11 +1402,11 @@ partial class C
}
- TestIsShared(code, True)
- End Sub
+ Await TestIsShared(code, True)
+ End Function
- Public Sub IsShared4()
+ Public Async Function TestIsShared4() As Task
Dim code =
partial class $$C
@@ -1417,66 +1418,66 @@ static partial class C
}
- TestIsShared(code, False)
- End Sub
+ Await TestIsShared(code, False)
+ End Function
#End Region
#Region "IsDerivedFrom tests"
- Public Sub IsDerivedFromObject_Explicit()
+ Public Async Function TestIsDerivedFromObject_Explicit() As Task
Dim code =
class $$C : object { }
- TestIsDerivedFrom(code, "System.Object", True)
- End Sub
+ Await TestIsDerivedFrom(code, "System.Object", True)
+ End Function
- Public Sub IsDerivedFrom_ObjectImplicit()
+ Public Async Function TestIsDerivedFrom_ObjectImplicit() As Task
Dim code =
class $$C { }
- TestIsDerivedFrom(code, "System.Object", True)
- End Sub
+ Await TestIsDerivedFrom(code, "System.Object", True)
+ End Function
- Public Sub IsDerivedFrom_NotString()
+ Public Async Function TestIsDerivedFrom_NotString() As Task
Dim code =
class $$C { }
- TestIsDerivedFrom(code, "System.String", False)
- End Sub
+ Await TestIsDerivedFrom(code, "System.String", False)
+ End Function
- Public Sub IsDerivedFrom_NotNonexistent()
+ Public Async Function TestIsDerivedFrom_NotNonexistent() As Task
Dim code =
class $$C { }
- TestIsDerivedFrom(code, "System.ThisIsClearlyNotARealClassName", False)
- End Sub
+ Await TestIsDerivedFrom(code, "System.ThisIsClearlyNotARealClassName", False)
+ End Function
- Public Sub IsDerivedFrom_UserClassInGlobalNamespace()
+ Public Async Function TestIsDerivedFrom_UserClassInGlobalNamespace() As Task
Dim code =
class B { }
class $$C : B { }
- TestIsDerivedFrom(code, "B", True)
- End Sub
+ Await TestIsDerivedFrom(code, "B", True)
+ End Function
- Public Sub IsDerivedFrom_UserClassInSameNamespace()
+ Public Async Function TestIsDerivedFrom_UserClassInSameNamespace() As Task
Dim code =
namespace NS
@@ -1486,11 +1487,11 @@ namespace NS
}
- TestIsDerivedFrom(code, "NS.B", True)
- End Sub
+ Await TestIsDerivedFrom(code, "NS.B", True)
+ End Function
- Public Sub IsDerivedFrom_UserClassInDifferentNamespace()
+ Public Async Function TestIsDerivedFrom_UserClassInDifferentNamespace() As Task
Dim code =
namespace NS1
@@ -1504,14 +1505,14 @@ namespace NS2
}
- TestIsDerivedFrom(code, "NS1.B", True)
- End Sub
+ Await TestIsDerivedFrom(code, "NS1.B", True)
+ End Function
#End Region
#Region "Kind tests"
- Public Sub Kind()
+ Public Async Function TestKind1() As Task
Dim code =
class $$C
@@ -1519,13 +1520,13 @@ class $$C
}
- TestKind(code, EnvDTE.vsCMElement.vsCMElementClass)
- End Sub
+ Await TestKind(code, EnvDTE.vsCMElement.vsCMElementClass)
+ End Function
#End Region
#Region "Parts tests"
- Public Sub Parts1()
+ Public Async Function TestParts1() As Task
Dim code =
class $$C
@@ -1533,11 +1534,11 @@ class $$C
}
- TestParts(code, 1)
- End Sub
+ Await TestParts(code, 1)
+ End Function
- Public Sub Parts2()
+ Public Async Function TestParts2() As Task
Dim code =
partial class $$C
@@ -1545,11 +1546,11 @@ partial class $$C
}
- TestParts(code, 1)
- End Sub
+ Await TestParts(code, 1)
+ End Function
- Public Sub Parts3()
+ Public Async Function TestParts3() As Task
Dim code =
partial class $$C
@@ -1561,14 +1562,14 @@ partial class C
}
- TestParts(code, 2)
- End Sub
+ Await TestParts(code, 2)
+ End Function
#End Region
#Region "AddAttribute tests"
- Public Sub AddAttribute1()
+ Public Async Function TestAddAttribute1() As Task
Dim code =
using System;
@@ -1583,11 +1584,11 @@ using System;
[Serializable()]
class C { }
- TestAddAttribute(code, expected, New AttributeData With {.Name = "Serializable"})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "Serializable"})
+ End Function
- Public Sub AddAttribute2()
+ Public Async Function TestAddAttribute2() As Task
Dim code =
using System;
@@ -1604,12 +1605,12 @@ using System;
[CLSCompliant(true)]
class C { }
- TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true", .Position = 1})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true", .Position = 1})
+ End Function
- Public Sub AddAttribute_BelowDocComment1()
+ Public Async Function TestAddAttribute_BelowDocComment1() As Task
Dim code =
using System;
@@ -1626,12 +1627,12 @@ using System;
[CLSCompliant(true)]
class C { }
- TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true"})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true"})
+ End Function
- Public Sub AddAttribute_BelowDocComment2()
+ Public Async Function TestAddAttribute_BelowDocComment2() As Task
Dim code =
using System;
@@ -1650,12 +1651,12 @@ using System;
[Serializable]
class C { }
- TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true"})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true"})
+ End Function
- Public Sub AddAttribute_BelowDocComment3()
+ Public Async Function TestAddAttribute_BelowDocComment3() As Task
Dim code =
using System;
@@ -1674,15 +1675,15 @@ using System;
[CLSCompliant(true)]
class C { }
- TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true", .Position = 1})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true", .Position = 1})
+ End Function
#End Region
#Region "AddBase tests"
- Public Sub AddBase1()
+ Public Async Function TestAddBase1() As Task
Dim code =
class $$C { }
@@ -1692,11 +1693,11 @@ class $$C { }
class C : B { }
- TestAddBase(code, "B", Nothing, expected)
- End Sub
+ Await TestAddBase(code, "B", Nothing, expected)
+ End Function
- Public Sub AddBase2()
+ Public Async Function TestAddBase2() As Task
Dim code =
class $$C : B { }
@@ -1706,11 +1707,11 @@ class $$C : B { }
class C : A, B { }
- TestAddBase(code, "A", Nothing, expected)
- End Sub
+ Await TestAddBase(code, "A", Nothing, expected)
+ End Function
- Public Sub AddBase3()
+ Public Async Function TestAddBase3() As Task
Dim code =
class $$C
@@ -1724,15 +1725,15 @@ class C : B
{
}
- TestAddBase(code, "B", Nothing, expected)
- End Sub
+ Await TestAddBase(code, "B", Nothing, expected)
+ End Function
#End Region
#Region "AddEvent tests"
- Public Sub AddEvent1()
+ Public Async Function TestAddEvent1() As Task
Dim code =
class C$$
@@ -1748,11 +1749,11 @@ class C
}
- TestAddEvent(code, expected, New EventData With {.Name = "E", .FullDelegateName = "System.EventHandler"})
- End Sub
+ Await TestAddEvent(code, expected, New EventData With {.Name = "E", .FullDelegateName = "System.EventHandler"})
+ End Function
- Public Sub AddEvent2()
+ Public Async Function TestAddEvent2() As Task
Dim code =
class C$$
@@ -1777,15 +1778,15 @@ class C
}
- TestAddEvent(code, expected, New EventData With {.Name = "E", .FullDelegateName = "System.EventHandler", .CreatePropertyStyleEvent = True})
- End Sub
+ Await TestAddEvent(code, expected, New EventData With {.Name = "E", .FullDelegateName = "System.EventHandler", .CreatePropertyStyleEvent = True})
+ End Function
#End Region
#Region "AddFunction tests"
- Public Sub AddFunction1()
+ Public Async Function TestAddFunction1() As Task
Dim code =
class $$C { }
@@ -1802,11 +1803,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void"})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void"})
+ End Function
- Public Sub AddFunction2()
+ Public Async Function TestAddFunction2() As Task
Dim code =
class $$C
@@ -1825,11 +1826,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void"})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void"})
+ End Function
- Public Sub AddFunction3()
+ Public Async Function TestAddFunction3() As Task
Dim code =
class $$C
@@ -1848,11 +1849,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "System.Void"})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "System.Void"})
+ End Function
- Public Sub AddFunction4()
+ Public Async Function TestAddFunction4() As Task
Dim code =
class $$C
@@ -1874,11 +1875,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void"})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void"})
+ End Function
- Public Sub AddFunction5()
+ Public Async Function TestAddFunction5() As Task
Dim code =
class $$C
@@ -1900,11 +1901,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void", .Position = 1})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void", .Position = 1})
+ End Function
- Public Sub AddFunction6()
+ Public Async Function TestAddFunction6() As Task
Dim code =
class $$C
@@ -1926,11 +1927,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void", .Position = "i"})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "Foo", .Type = "void", .Position = "i"})
+ End Function
- Public Sub AddFunction_Constructor1()
+ Public Async Function TestAddFunction_Constructor1() As Task
Dim code =
class $$C
@@ -1948,11 +1949,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "C", .Kind = EnvDTE.vsCMFunction.vsCMFunctionConstructor})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "C", .Kind = EnvDTE.vsCMFunction.vsCMFunctionConstructor})
+ End Function
- Public Sub AddFunction_Constructor2()
+ Public Async Function TestAddFunction_Constructor2() As Task
Dim code =
class $$C
@@ -1970,11 +1971,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "C", .Kind = EnvDTE.vsCMFunction.vsCMFunctionConstructor, .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "C", .Kind = EnvDTE.vsCMFunction.vsCMFunctionConstructor, .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
+ End Function
- Public Sub AddFunction_EscapedName()
+ Public Async Function TestAddFunction_EscapedName() As Task
Dim code =
class $$C
@@ -1993,11 +1994,11 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "@as", .Type = "void", .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "@as", .Type = "void", .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
+ End Function
- Public Sub AddFunction_Destructor()
+ Public Async Function TestAddFunction_Destructor() As Task
Dim code =
class $$C
@@ -2015,12 +2016,12 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "C", .Kind = EnvDTE.vsCMFunction.vsCMFunctionDestructor, .Type = "void", .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "C", .Kind = EnvDTE.vsCMFunction.vsCMFunctionDestructor, .Type = "void", .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
+ End Function
- Public Sub AddFunction_AfterIncompleteMember()
+ Public Async Function TestAddFunction_AfterIncompleteMember() As Task
Dim code =
class $$C
@@ -2042,25 +2043,25 @@ class C
}
- TestAddFunction(code, expected, New FunctionData With {.Name = "M2", .Type = "void", .Position = -1, .Access = EnvDTE.vsCMAccess.vsCMAccessPrivate})
- End Sub
+ Await TestAddFunction(code, expected, New FunctionData With {.Name = "M2", .Type = "void", .Position = -1, .Access = EnvDTE.vsCMAccess.vsCMAccessPrivate})
+ End Function
#End Region
#Region "AddImplementedInterface tests"
- Public Sub AddImplementedInterface1()
+ Public Async Function TestAddImplementedInterface1() As Task
Dim code =
class $$C { }
- TestAddImplementedInterfaceThrows(Of ArgumentException)(code, "I", Nothing)
- End Sub
+ Await TestAddImplementedInterfaceThrows(Of ArgumentException)(code, "I", Nothing)
+ End Function
- Public Sub AddImplementedInterface2()
+ Public Async Function TestAddImplementedInterface2() As Task
Dim code =
class $$C { }
@@ -2073,11 +2074,11 @@ class C : I { }
interface I { }
- TestAddImplementedInterface(code, "I", -1, expected)
- End Sub
+ Await TestAddImplementedInterface(code, "I", -1, expected)
+ End Function
- Public Sub AddImplementedInterface3()
+ Public Async Function TestAddImplementedInterface3() As Task
Dim code =
class $$C : I { }
@@ -2092,11 +2093,11 @@ interface I { }
interface J { }
- TestAddImplementedInterface(code, "J", -1, expected)
- End Sub
+ Await TestAddImplementedInterface(code, "J", -1, expected)
+ End Function
- Public Sub AddImplementedInterface4()
+ Public Async Function TestAddImplementedInterface4() As Task
Dim code =
class $$C : I { }
@@ -2111,11 +2112,11 @@ interface I { }
interface J { }
- TestAddImplementedInterface(code, "J", 0, expected)
- End Sub
+ Await TestAddImplementedInterface(code, "J", 0, expected)
+ End Function
- Public Sub AddImplementedInterface5()
+ Public Async Function TestAddImplementedInterface5() As Task
Dim code =
class $$C : I, K { }
@@ -2132,15 +2133,15 @@ interface J { }
interface K { }
- TestAddImplementedInterface(code, "J", 1, expected)
- End Sub
+ Await TestAddImplementedInterface(code, "J", 1, expected)
+ End Function
#End Region
#Region "AddProperty tests"
- Public Sub AddProperty1()
+ Public Async Function TestAddProperty1() As Task
Dim code =
class C$$
@@ -2166,11 +2167,11 @@ class C
}
- TestAddProperty(code, expected, New PropertyData With {.GetterName = "Name", .PutterName = "Name", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefString})
- End Sub
+ Await TestAddProperty(code, expected, New PropertyData With {.GetterName = "Name", .PutterName = "Name", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefString})
+ End Function
- Public Sub AddProperty2()
+ Public Async Function TestAddProperty2() As Task
Dim code =
class C$$
@@ -2192,11 +2193,11 @@ class C
}
- TestAddProperty(code, expected, New PropertyData With {.GetterName = "Name", .PutterName = Nothing, .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefString})
- End Sub
+ Await TestAddProperty(code, expected, New PropertyData With {.GetterName = "Name", .PutterName = Nothing, .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefString})
+ End Function
- Public Sub AddProperty3()
+ Public Async Function TestAddProperty3() As Task
Dim code =
class C$$
@@ -2217,15 +2218,15 @@ class C
}
- TestAddProperty(code, expected, New PropertyData With {.GetterName = Nothing, .PutterName = "Name", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefString})
- End Sub
+ Await TestAddProperty(code, expected, New PropertyData With {.GetterName = Nothing, .PutterName = "Name", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefString})
+ End Function
#End Region
#Region "AddVariable tests"
- Public Sub AddVariable1()
+ Public Async Function TestAddVariable1() As Task
Dim code =
class $$C { }
@@ -2239,11 +2240,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32"})
+ End Function
- Public Sub AddVariable2()
+ Public Async Function TestAddVariable2() As Task
Dim code =
class $$C
@@ -2259,11 +2260,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32"})
+ End Function
- Public Sub AddVariable3()
+ Public Async Function TestAddVariable3() As Task
Dim code =
class $$C
@@ -2282,11 +2283,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "Foo"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "Foo"})
+ End Function
- Public Sub AddVariable4()
+ Public Async Function TestAddVariable4() As Task
Dim code =
class $$C
@@ -2307,11 +2308,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
+ End Function
- Public Sub AddVariable5()
+ Public Async Function TestAddVariable5() As Task
Dim code =
class $$C
@@ -2333,11 +2334,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
+ End Function
- Public Sub AddVariable6()
+ Public Async Function TestAddVariable6() As Task
Dim code =
class $$C
@@ -2359,11 +2360,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
+ End Function
- Public Sub AddVariable7()
+ Public Async Function TestAddVariable7() As Task
Dim code =
class $$C
@@ -2385,11 +2386,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "y"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "y"})
+ End Function
- Public Sub AddVariable8()
+ Public Async Function TestAddVariable8() As Task
Dim code =
class $$C
@@ -2408,11 +2409,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = 0})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = 0})
+ End Function
- Public Sub AddVariable9()
+ Public Async Function TestAddVariable9() As Task
Dim code =
class $$C
@@ -2431,11 +2432,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = -1})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = -1})
+ End Function
- Public Sub AddVariable10()
+ Public Async Function TestAddVariable10() As Task
Dim code =
class $$C
@@ -2455,11 +2456,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
+ End Function
- Public Sub AddVariable11()
+ Public Async Function TestAddVariable11() As Task
Dim code =
class $$C
@@ -2479,11 +2480,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "x"})
+ End Function
- Public Sub AddVariable12()
+ Public Async Function TestAddVariable12() As Task
Dim code =
class $$C
@@ -2503,11 +2504,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "y"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Position = "y"})
+ End Function
- Public Sub AddVariable13()
+ Public Async Function TestAddVariable13() As Task
Dim code =
class $$C
@@ -2523,12 +2524,12 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessPublic})
+ End Function
- Public Sub AddVariable14()
+ Public Async Function TestAddVariable14() As Task
Dim code =
class $$C
@@ -2544,12 +2545,12 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessPrivate})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessPrivate})
+ End Function
- Public Sub AddVariable15()
+ Public Async Function TestAddVariable15() As Task
Dim code =
class $$C
@@ -2565,12 +2566,12 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessProject})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessProject})
+ End Function
- Public Sub AddVariable16()
+ Public Async Function TestAddVariable16() As Task
Dim code =
class $$C
@@ -2586,12 +2587,12 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessProjectOrProtected})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessProjectOrProtected})
+ End Function
- Public Sub AddVariable17()
+ Public Async Function TestAddVariable17() As Task
Dim code =
class $$C
@@ -2607,11 +2608,11 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessProtected})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "i", .Type = "System.Int32", .Access = EnvDTE.vsCMAccess.vsCMAccessProtected})
+ End Function
- Public Sub AddVariableOutsideOfRegion()
+ Public Async Function TestAddVariableOutsideOfRegion() As Task
Dim code =
class $$C
@@ -2634,12 +2635,12 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "j", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefInt, .Position = "i"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "j", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefInt, .Position = "i"})
+ End Function
- Public Sub AddVariableAfterComment()
+ Public Async Function TestAddVariableAfterComment() As Task
Dim code =
class $$C
@@ -2657,15 +2658,15 @@ class C
}
- TestAddVariable(code, expected, New VariableData With {.Name = "j", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefInt, .Position = "i"})
- End Sub
+ Await TestAddVariable(code, expected, New VariableData With {.Name = "j", .Type = EnvDTE.vsCMTypeRef.vsCMTypeRefInt, .Position = "i"})
+ End Function
#End Region
#Region "RemoveBase tests"
- Public Sub RemoveBase1()
+ Public Async Function TestRemoveBase1() As Task
Dim code =
class $$C : B { }
@@ -2675,11 +2676,11 @@ class $$C : B { }
class C { }
- TestRemoveBase(code, "B", expected)
- End Sub
+ Await TestRemoveBase(code, "B", expected)
+ End Function
- Public Sub RemoveBase2()
+ Public Async Function TestRemoveBase2() As Task
Dim code =
class $$C : A, B { }
@@ -2689,15 +2690,15 @@ class $$C : A, B { }
class C : B { }
- TestRemoveBase(code, "A", expected)
- End Sub
+ Await TestRemoveBase(code, "A", expected)
+ End Function
#End Region
#Region "RemoveImplementedInterface tests"
- Public Sub RemoveImplementedInterface1()
+ Public Async Function TestRemoveImplementedInterface1() As Task
Dim code =
class $$C : I { }
@@ -2709,11 +2710,11 @@ interface I { }
class C { }
interface I { }
- TestRemoveImplementedInterface(code, "I", expected)
- End Sub
+ Await TestRemoveImplementedInterface(code, "I", expected)
+ End Function
- Public Sub RemoveImplementedInterface2()
+ Public Async Function TestRemoveImplementedInterface2() As Task
Dim code =
class $$C : A, I { }
@@ -2727,15 +2728,15 @@ class C : A { }
class A { }
interface I { }
- TestRemoveImplementedInterface(code, "I", expected)
- End Sub
+ Await TestRemoveImplementedInterface(code, "I", expected)
+ End Function
#End Region
#Region "RemoveMember tests"
- Public Sub RemoveMember1()
+ Public Async Function TestRemoveMember1() As Task
Dim code =
class $$C
@@ -2753,11 +2754,11 @@ class C
}
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember2()
+ Public Async Function TestRemoveMember2() As Task
Dim code =
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember3()
+ Public Async Function TestRemoveMember3() As Task
Dim code =
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember4()
+ Public Async Function TestRemoveMember4() As Task
Dim code =
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember5()
+ Public Async Function TestRemoveMember5() As Task
Dim code =
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember6()
+ Public Async Function TestRemoveMember6() As Task
Dim code =
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember7()
+ Public Async Function TestRemoveMember7() As Task
Dim code =
- TestRemoveChild(code, expected, "b")
- End Sub
+ Await TestRemoveChild(code, expected, "b")
+ End Function
- Public Sub RemoveMember8()
+ Public Async Function TestRemoveMember8() As Task
Dim code =
class $$C
@@ -2947,11 +2948,11 @@ class C
}
- TestRemoveChild(code, expected, "Foo")
- End Sub
+ Await TestRemoveChild(code, expected, "Foo")
+ End Function
- Public Sub RemoveMember_Event1()
+ Public Async Function TestRemoveMember_Event1() As Task
Dim code =
class $$C
@@ -2967,11 +2968,11 @@ class C
}
- TestRemoveChild(code, expected, "E")
- End Sub
+ Await TestRemoveChild(code, expected, "E")
+ End Function
- Public Sub RemoveMember_Event2()
+ Public Async Function TestRemoveMember_Event2() As Task
Dim code =
class $$C
@@ -2988,11 +2989,11 @@ class C
}
- TestRemoveChild(code, expected, "E")
- End Sub
+ Await TestRemoveChild(code, expected, "E")
+ End Function
- Public Sub RemoveMember_Event3()
+ Public Async Function TestRemoveMember_Event3() As Task
Dim code =
class $$C
@@ -3009,11 +3010,11 @@ class C
}
- TestRemoveChild(code, expected, "F")
- End Sub
+ Await TestRemoveChild(code, expected, "F")
+ End Function
- Public Sub RemoveMember_Event4()
+ Public Async Function TestRemoveMember_Event4() As Task
Dim code =
class $$C
@@ -3030,11 +3031,11 @@ class C
}
- TestRemoveChild(code, expected, "G")
- End Sub
+ Await TestRemoveChild(code, expected, "G")
+ End Function
- Public Sub RemoveMember_Event5()
+ Public Async Function TestRemoveMember_Event5() As Task
Dim code =
class $$C
@@ -3054,15 +3055,15 @@ class C
}
- TestRemoveChild(code, expected, "E")
- End Sub
+ Await TestRemoveChild(code, expected, "E")
+ End Function
#End Region
#Region "Set Access tests"
- Public Sub SetAccess1()
+ Public Async Function TestSetAccess1() As Task
Dim code =
class $$C
@@ -3077,11 +3078,11 @@ public class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPublic)
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPublic)
+ End Function
- Public Sub SetAccess2()
+ Public Async Function TestSetAccess2() As Task
Dim code =
public class $$C
@@ -3096,11 +3097,11 @@ internal class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessProject)
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessProject)
+ End Function
- Public Sub SetAccess3()
+ Public Async Function TestSetAccess3() As Task
Dim code =
protected internal class $$C
@@ -3115,11 +3116,11 @@ public class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPublic)
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPublic)
+ End Function
- Public Sub SetAccess4()
+ Public Async Function TestSetAccess4() As Task
Dim code =
public class $$C
@@ -3134,11 +3135,11 @@ public class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessProjectOrProtected, ThrowsArgumentException(Of EnvDTE.vsCMAccess)())
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessProjectOrProtected, ThrowsArgumentException(Of EnvDTE.vsCMAccess)())
+ End Function
- Public Sub SetAccess5()
+ Public Async Function TestSetAccess5() As Task
Dim code =
public class $$C
@@ -3153,11 +3154,11 @@ class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessDefault)
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessDefault)
+ End Function
- Public Sub SetAccess6()
+ Public Async Function TestSetAccess6() As Task
Dim code =
public class $$C
@@ -3172,11 +3173,11 @@ public class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPrivate, ThrowsArgumentException(Of EnvDTE.vsCMAccess)())
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPrivate, ThrowsArgumentException(Of EnvDTE.vsCMAccess)())
+ End Function
- Public Sub SetAccess7()
+ Public Async Function TestSetAccess7() As Task
Dim code =
class C
@@ -3197,15 +3198,15 @@ class C
}
- TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPrivate)
- End Sub
+ Await TestSetAccess(code, expected, EnvDTE.vsCMAccess.vsCMAccessPrivate)
+ End Function
#End Region
#Region "Set ClassKind tests"
- Public Sub SetClassKind1()
+ Public Async Function TestSetClassKind1() As Task
Dim code =
class $$C
@@ -3220,11 +3221,11 @@ class C
}
- TestSetClassKind(code, expected, EnvDTE80.vsCMClassKind.vsCMClassKindMainClass)
- End Sub
+ Await TestSetClassKind(code, expected, EnvDTE80.vsCMClassKind.vsCMClassKindMainClass)
+ End Function
- Public Sub SetClassKind2()
+ Public Async Function TestSetClassKind2() As Task
Dim code =
class $$C
@@ -3239,11 +3240,11 @@ partial class C
}
- TestSetClassKind(code, expected, EnvDTE80.vsCMClassKind.vsCMClassKindPartialClass)
- End Sub
+ Await TestSetClassKind(code, expected, EnvDTE80.vsCMClassKind.vsCMClassKindPartialClass)
+ End Function
- Public Sub SetClassKind3()
+ Public Async Function TestSetClassKind3() As Task
Dim code =
partial class $$C
@@ -3258,15 +3259,15 @@ class C
}
- TestSetClassKind(code, expected, EnvDTE80.vsCMClassKind.vsCMClassKindMainClass)
- End Sub
+ Await TestSetClassKind(code, expected, EnvDTE80.vsCMClassKind.vsCMClassKindMainClass)
+ End Function
#End Region
#Region "Set Comment tests"
- Public Sub SetComment1()
+ Public Async Function TestSetComment1() As Task
Dim code =
// Foo
@@ -3280,11 +3281,11 @@ class $$C { }
class C { }
- TestSetComment(code, expected, Nothing)
- End Sub
+ Await TestSetComment(code, expected, Nothing)
+ End Function
- Public Sub SetComment2()
+ Public Async Function TestSetComment2() As Task
Dim code =
// Foo
@@ -3300,11 +3301,11 @@ class $$C { }
class C { }
- TestSetComment(code, expected, "Bar")
- End Sub
+ Await TestSetComment(code, expected, "Bar")
+ End Function
- Public Sub SetComment3()
+ Public Async Function TestSetComment3() As Task
Dim code =
// Foo
@@ -3319,15 +3320,15 @@ class $$C { }
class C { }
- TestSetComment(code, expected, "Blah")
- End Sub
+ Await TestSetComment(code, expected, "Blah")
+ End Function
#End Region
#Region "Set DocComment tests"
- Public Sub SetDocComment_Nothing()
+ Public Async Function TestSetDocComment_Nothing() As Task
Dim code =
class $$C { }
@@ -3338,11 +3339,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, Nothing, ThrowsArgumentException(Of String))
- End Sub
+ Await TestSetDocComment(code, expected, Nothing, ThrowsArgumentException(Of String))
+ End Function
- Public Sub SetDocComment_InvalidXml1()
+ Public Async Function TestSetDocComment_InvalidXml1() As Task
Dim code =
class $$C { }
@@ -3353,11 +3354,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, "Blah", ThrowsArgumentException(Of String))
- End Sub
+ Await TestSetDocComment(code, expected, "Blah", ThrowsArgumentException(Of String))
+ End Function
- Public Sub SetDocComment_InvalidXml2()
+ Public Async Function TestSetDocComment_InvalidXml2() As Task
Dim code =
class $$C { }
@@ -3368,11 +3369,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, "Blah", ThrowsArgumentException(Of String))
- End Sub
+ Await TestSetDocComment(code, expected, "Blah", ThrowsArgumentException(Of String))
+ End Function
- Public Sub SetDocComment1()
+ Public Async Function TestSetDocComment1() As Task
Dim code =
class $$C { }
@@ -3384,11 +3385,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, "Hello World")
- End Sub
+ Await TestSetDocComment(code, expected, "Hello World")
+ End Function
- Public Sub SetDocComment2()
+ Public Async Function TestSetDocComment2() As Task
Dim code =
/// <summary>Hello World</summary>
@@ -3401,11 +3402,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, "Blah")
- End Sub
+ Await TestSetDocComment(code, expected, "Blah")
+ End Function
- Public Sub SetDocComment3()
+ Public Async Function TestSetDocComment3() As Task
Dim code =
// Foo
@@ -3419,11 +3420,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, "Blah")
- End Sub
+ Await TestSetDocComment(code, expected, "Blah")
+ End Function
- Public Sub SetDocComment4()
+ Public Async Function TestSetDocComment4() As Task
Dim code =
/// <summary>FogBar</summary>
@@ -3438,11 +3439,11 @@ class $$C { }
class C { }
- TestSetDocComment(code, expected, "Blah")
- End Sub
+ Await TestSetDocComment(code, expected, "Blah")
+ End Function
- Public Sub SetDocComment5()
+ Public Async Function TestSetDocComment5() As Task
Dim code =
namespace N
@@ -3460,15 +3461,15 @@ namespace N
}
- TestSetDocComment(code, expected, "Hello World")
- End Sub
+ Await TestSetDocComment(code, expected, "Hello World")
+ End Function
#End Region
#Region "Set InheritanceKind tests"
- Public Sub SetInheritanceKind1()
+ Public Async Function TestSetInheritanceKind1() As Task
Dim code =
class $$C
@@ -3483,11 +3484,11 @@ abstract class C
}
- TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract)
- End Sub
+ Await TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract)
+ End Function
- Public Sub SetInheritanceKind2()
+ Public Async Function TestSetInheritanceKind2() As Task
Dim code =
class $$C
@@ -3502,11 +3503,11 @@ sealed class C
}
- TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindSealed)
- End Sub
+ Await TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindSealed)
+ End Function
- Public Sub SetInheritanceKind3()
+ Public Async Function TestSetInheritanceKind3() As Task
Dim code =
class C
@@ -3527,11 +3528,11 @@ class C
}
- TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract)
- End Sub
+ Await TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindAbstract)
+ End Function
- Public Sub SetInheritanceKind4()
+ Public Async Function TestSetInheritanceKind4() As Task
Dim code =
class C
@@ -3552,15 +3553,15 @@ class C
}
- TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindSealed Or EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNew)
- End Sub
+ Await TestSetInheritanceKind(code, expected, EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindSealed Or EnvDTE80.vsCMInheritanceKind.vsCMInheritanceKindNew)
+ End Function
#End Region
#Region "Set IsAbstract tests"
- Public Sub SetIsAbstract1()
+ Public Async Function TestSetIsAbstract1() As Task
Dim code =
class $$C
@@ -3575,11 +3576,11 @@ abstract class C
}
- TestSetIsAbstract(code, expected, True)
- End Sub
+ Await TestSetIsAbstract(code, expected, True)
+ End Function
- Public Sub SetIsAbstract2()
+ Public Async Function TestSetIsAbstract2() As Task
Dim code =
abstract class $$C
@@ -3594,11 +3595,11 @@ class C
}
- TestSetIsAbstract(code, expected, False)
- End Sub
+ Await TestSetIsAbstract(code, expected, False)
+ End Function
- Public Sub SetIsAbstract3()
+ Public Async Function TestSetIsAbstract3() As Task
Dim code =
class C
@@ -3619,11 +3620,11 @@ class C
}
- TestSetIsAbstract(code, expected, True)
- End Sub
+ Await TestSetIsAbstract(code, expected, True)
+ End Function
- Public Sub SetIsAbstract4()
+ Public Async Function TestSetIsAbstract4() As Task
Dim code =
class C
@@ -3644,11 +3645,11 @@ class C
}
- TestSetIsAbstract(code, expected, False)
- End Sub
+ Await TestSetIsAbstract(code, expected, False)
+ End Function
- Public Sub SetIsAbstract5()
+ Public Async Function TestSetIsAbstract5() As Task
' Note: In Dev11 the C# Code Model will happily include an abstract modifier
' on a sealed class. This differs from VB Code Model where the NotInheritable
' modifier will be removed when adding MustInherit. In Roslyn, we take the Dev11
@@ -3668,15 +3669,15 @@ abstract class C
}
- TestSetIsAbstract(code, expected, True)
- End Sub
+ Await TestSetIsAbstract(code, expected, True)
+ End Function
#End Region
#Region "Set IsShared tests"
- Public Sub SetIsShared1()
+ Public Async Function TestSetIsShared1() As Task
Dim code =
class $$C
@@ -3691,11 +3692,11 @@ static class C
}
- TestSetIsShared(code, expected, True)
- End Sub
+ Await TestSetIsShared(code, expected, True)
+ End Function
- Public Sub SetIsShared2()
+ Public Async Function TestSetIsShared2() As Task
Dim code =
static class $$C
@@ -3710,14 +3711,14 @@ class C
}
- TestSetIsShared(code, expected, False)
- End Sub
+ Await TestSetIsShared(code, expected, False)
+ End Function
#End Region
#Region "Set Name tests"
- Public Sub SetName1()
+ Public Async Function TestSetName1() As Task
Dim code =
class $$Foo
@@ -3732,11 +3733,11 @@ class Bar
}
- TestSetName(code, expected, "Bar", NoThrow(Of String)())
- End Sub
+ Await TestSetName(code, expected, "Bar", NoThrow(Of String)())
+ End Function
- Public Sub SetName2()
+ Public Async Function TestSetName2() As Task
Dim code =
class $$Foo
@@ -3757,11 +3758,11 @@ class Bar
}
- TestSetName(code, expected, "Bar", NoThrow(Of String)())
- End Sub
+ Await TestSetName(code, expected, "Bar", NoThrow(Of String)())
+ End Function
- Public Sub SetName3()
+ Public Async Function TestSetName3() As Task
Dim code =
partial class $$Foo
@@ -3784,13 +3785,13 @@ partial class Foo
}
- TestSetName(code, expected, "Bar", NoThrow(Of String)())
- End Sub
+ Await TestSetName(code, expected, "Bar", NoThrow(Of String)())
+ End Function
#End Region
- Public Sub GetBaseName1()
+ Public Async Function TestGetBaseName1() As Task
Dim code =
using N.M;
@@ -3808,11 +3809,11 @@ class $$C : Generic<string>
}
- TestGetBaseName(code, "N.M.Generic")
- End Sub
+ Await TestGetBaseName(code, "N.M.Generic")
+ End Function
- Public Sub TypeDescriptor_GetProperties()
+ Public Async Function TestTypeDescriptor_GetProperties() As Task
Dim code =
class $$C
@@ -3828,11 +3829,11 @@ class $$C
"ClassKind", "PartialClasses", "DataTypeKind", "Parts", "InheritanceKind", "IsGeneric",
"IsShared"}
- TestPropertyDescriptors(code, expectedPropertyNames)
- End Sub
+ Await TestPropertyDescriptors(code, expectedPropertyNames)
+ End Function
- Public Sub ExternalClass_ImplementedInterfaces()
+ Public Async Function TestExternalClass_ImplementedInterfaces() As Task
Dim code =
class $$Foo : System.Collections.Generic.List<int>
@@ -3840,24 +3841,24 @@ class $$Foo : System.Collections.Generic.List<int>
}
- TestElement(code,
+ Await TestElement(code,
Sub(codeClass)
Dim listType = TryCast(codeClass.Bases.Item(1), EnvDTE80.CodeClass2)
Assert.NotNull(listType)
Assert.Equal(8, listType.ImplementedInterfaces.Count)
End Sub)
- End Sub
+ End Function
- Public Sub ExternalFunction_Overloads()
+ Public Async Function TestExternalFunction_Overloads() As Task
Dim code =
class $$Derived : System.Console
{
}
- TestElement(
+ Await TestElement(
code,
Sub(codeClass)
Dim baseType = TryCast(codeClass.Bases.Item(1), EnvDTE80.CodeClass2)
@@ -3870,17 +3871,17 @@ class $$Derived : System.Console
Assert.Equal(19, method1.Overloads.Count)
End Sub)
- End Sub
+ End Function
- Public Sub ExternalFunction_Overloads_NotOverloaded()
+ Public Async Function TestExternalFunction_Overloads_NotOverloaded() As Task
Dim code =
class $$Derived : System.Console
{
}
- TestElement(
+ Await TestElement(
code,
Sub(codeClass)
Dim baseType = TryCast(codeClass.Bases.Item(1), EnvDTE80.CodeClass2)
@@ -3893,13 +3894,12 @@ class $$Derived : System.Console
Assert.Equal("System.Console.Clear", TryCast(method2.Overloads.Item(1), EnvDTE80.CodeFunction2).FullName)
End Sub)
- End Sub
+ End Function
Protected Overrides ReadOnly Property LanguageName As String
Get
Return LanguageNames.CSharp
End Get
End Property
-
End Class
-End Namespace
+End Namespace
\ No newline at end of file
diff --git a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeDelegateTests.vb b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeDelegateTests.vb
index 9c9b194d4577ca5adf8b0ae9751dcfa6856e4c26..5090d09ab402d1a55979c4a164f370db917cb26d 100644
--- a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeDelegateTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeDelegateTests.vb
@@ -1,5 +1,6 @@
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Roslyn.Test.Utilities
@@ -10,13 +11,13 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel.CSharp
#Region "GetStartPoint() tests"
- Public Sub GetStartPoint1()
+ Public Async Function TestGetStartPoint1() As Task
Dim code =
delegate void $$Foo(int i);
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -37,17 +38,17 @@ delegate void $$Foo(int i);
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=1, absoluteOffset:=1, lineLength:=25)))
- End Sub
+ End Function
- Public Sub GetStartPoint2()
+ Public Async Function TestGetStartPoint2() As Task
Dim code =
[System.CLSCompliant(true)]
delegate void $$Foo(int i);
- TestGetStartPoint(code,
+ Await TestGetStartPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -68,20 +69,20 @@ delegate void $$Foo(int i);
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=1, absoluteOffset:=1, lineLength:=27)))
- End Sub
+ End Function
#End Region
#Region "GetEndPoint() tests"
- Public Sub GetEndPoint1()
+ Public Async Function TestGetEndPoint1() As Task
Dim code =
delegate void $$Foo(int i);
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -102,17 +103,17 @@ delegate void $$Foo(int i);
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=1, lineOffset:=26, absoluteOffset:=26, lineLength:=25)))
- End Sub
+ End Function
- Public Sub GetEndPoint2()
+ Public Async Function TestGetEndPoint2() As Task
Dim code =
[System.CLSCompliant(true)]
delegate void $$Foo(int i);
- TestGetEndPoint(code,
+ Await TestGetEndPoint(code,
Part(EnvDTE.vsCMPart.vsCMPartAttributes,
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartAttributesWithDelimiter,
@@ -133,28 +134,28 @@ delegate void $$Foo(int i);
ThrowsNotImplementedException),
Part(EnvDTE.vsCMPart.vsCMPartWholeWithAttributes,
TextPoint(line:=2, lineOffset:=26, absoluteOffset:=54, lineLength:=25)))
- End Sub
+ End Function
#End Region
#Region "BaseClass tests"
- Public Sub BaseClass()
+ Public Async Function TestBaseClass1() As Task
Dim code =
delegate void $$D();
- TestBaseClass(code, "System.Delegate")
- End Sub
+ Await TestBaseClass(code, "System.Delegate")
+ End Function
#End Region
#Region "Prototype tests"
- Public Sub Prototype_UniqueSignature()
+ Public Async Function TestPrototype_UniqueSignature() As Task
Dim code =
namespace N
@@ -163,11 +164,11 @@ namespace N
}
- TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeUniqueSignature, "N.D")
- End Sub
+ Await TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeUniqueSignature, "N.D")
+ End Function
- Public Sub Prototype_ClassName()
+ Public Async Function TestPrototype_ClassName() As Task
Dim code =
namespace N
@@ -176,11 +177,11 @@ namespace N
}
- TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeClassName, "delegate N.D")
- End Sub
+ Await TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeClassName, "delegate N.D")
+ End Function
- Public Sub Prototype_FullName()
+ Public Async Function TestPrototype_FullName() As Task
Dim code =
namespace N
@@ -189,11 +190,11 @@ namespace N
}
- TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeFullname, "delegate N.D")
- End Sub
+ Await TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeFullname, "delegate N.D")
+ End Function
- Public Sub Prototype_Type()
+ Public Async Function TestPrototype_Type() As Task
Dim code =
namespace N
@@ -202,50 +203,50 @@ namespace N
}
- TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeType, "delegate void D")
- End Sub
+ Await TestPrototype(code, EnvDTE.vsCMPrototype.vsCMPrototypeType, "delegate void D")
+ End Function
#End Region
#Region "Type tests"
- Public Sub Type_Void()
+ Public Async Function TestType_Void() As Task
Dim code =
delegate void $$D();
- TestTypeProp(code, New CodeTypeRefData With {.CodeTypeFullName = "System.Void", .TypeKind = EnvDTE.vsCMTypeRef.vsCMTypeRefVoid})
- End Sub
+ Await TestTypeProp(code, New CodeTypeRefData With {.CodeTypeFullName = "System.Void", .TypeKind = EnvDTE.vsCMTypeRef.vsCMTypeRefVoid})
+ End Function
- Public Sub Type_Int()
+ Public Async Function TestType_Int() As Task
Dim code =
delegate int $$D();
- TestTypeProp(code, New CodeTypeRefData With {.CodeTypeFullName = "System.Int32", .TypeKind = EnvDTE.vsCMTypeRef.vsCMTypeRefInt})
- End Sub
+ Await TestTypeProp(code, New CodeTypeRefData With {.CodeTypeFullName = "System.Int32", .TypeKind = EnvDTE.vsCMTypeRef.vsCMTypeRefInt})
+ End Function
- Public Sub Type_SourceClass()
+ Public Async Function TestType_SourceClass() As Task
Dim code =
class C { }
delegate C $$D();
- TestTypeProp(code, New CodeTypeRefData With {.CodeTypeFullName = "C", .TypeKind = EnvDTE.vsCMTypeRef.vsCMTypeRefCodeType})
- End Sub
+ Await TestTypeProp(code, New CodeTypeRefData With {.CodeTypeFullName = "C", .TypeKind = EnvDTE.vsCMTypeRef.vsCMTypeRefCodeType})
+ End Function
#End Region
#Region "Set Type tests"
- Public Sub SetType1()
+ Public Async Function TestSetType1() As Task
Dim code =
public delegate int $$D();
@@ -256,11 +257,11 @@ public delegate int $$D();
public delegate void D();
- TestSetTypeProp(code, expected, "void")
- End Sub
+ Await TestSetTypeProp(code, expected, "void")
+ End Function
- Public Sub SetType2()
+ Public Async Function TestSetType2() As Task
Dim code =
public delegate string $$D();
@@ -271,8 +272,8 @@ public delegate string $$D();
public delegate int? D();
- TestSetTypeProp(code, expected, "System.Nullable")
- End Sub
+ Await TestSetTypeProp(code, expected, "System.Nullable")
+ End Function
#End Region
@@ -280,31 +281,31 @@ public delegate int? D();
- Public Sub TestParameterNameWithEscapeCharacters()
+ Public Async Function TestParameterNameWithEscapeCharacters() As Task
Dim code =
public delegate int $$M(int @int);
- TestAllParameterNames(code, "@int")
- End Sub
+ Await TestAllParameterNames(code, "@int")
+ End Function
- Public Sub TestParameterNameWithEscapeCharacters_2()
+ Public Async Function TestParameterNameWithEscapeCharacters_2() As Task
Dim code =
public delegate int $$M(int @int, string @string);
- TestAllParameterNames(code, "@int", "@string")
- End Sub
+ Await TestAllParameterNames(code, "@int", "@string")
+ End Function
#End Region
#Region "AddAttribute tests"
- Public Sub AddAttribute1()
+ Public Async Function TestAddAttribute1() As Task
Dim code =
using System;
@@ -319,11 +320,11 @@ using System;
[Serializable()]
delegate void D();
- TestAddAttribute(code, expected, New AttributeData With {.Name = "Serializable"})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "Serializable"})
+ End Function
- Public Sub AddAttribute2()
+ Public Async Function TestAddAttribute2() As Task
Dim code =
using System;
@@ -340,12 +341,12 @@ using System;
[CLSCompliant(true)]
delegate void D();
- TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true", .Position = 1})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true", .Position = 1})
+ End Function
- Public Sub AddAttribute_BelowDocComment()
+ Public Async Function TestAddAttribute_BelowDocComment() As Task
Dim code =
using System;
@@ -362,13 +363,13 @@ using System;
[CLSCompliant(true)]
delegate void D();
- TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true"})
- End Sub
+ Await TestAddAttribute(code, expected, New AttributeData With {.Name = "CLSCompliant", .Value = "true"})
+ End Function
#End Region
- Public Sub TypeDescriptor_GetProperties()
+ Public Async Function TestTypeDescriptor_GetProperties() As Task
Dim code =
delegate void $$D();
@@ -381,8 +382,8 @@ delegate void $$D();
"Bases", "Members", "Access", "Attributes", "DocComment", "Comment",
"DerivedTypes", "BaseClass", "Type", "Parameters", "IsGeneric"}
- TestPropertyDescriptors(code, expectedPropertyNames)
- End Sub
+ Await TestPropertyDescriptors(code, expectedPropertyNames)
+ End Function
Protected Overrides ReadOnly Property LanguageName As String
Get
diff --git a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeEnumTests.vb b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeEnumTests.vb
index a91c34f01c157695c70901a3a6ffa6718a4ff032..1c2e49d612559da7b6b36f847cd6a94c17054ea1 100644
--- a/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeEnumTests.vb
+++ b/src/VisualStudio/Core/Test/CodeModel/CSharp/CodeEnumTests.vb
@@ -1,5 +1,6 @@
' Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+Imports System.Threading.Tasks
Imports Microsoft.CodeAnalysis
Imports Roslyn.Test.Utilities
@@ -10,17 +11,17 @@ Namespace Microsoft.VisualStudio.LanguageServices.UnitTests.CodeModel.CSharp
#Region "Access tests"
- Public Sub Access1()
+ Public Async Function TestAccess1() As Task
Dim code =