未验证 提交 0cebbc36 编写于 作者: M msftbot[bot] 提交者: GitHub

Merge pull request #44277 from jasonmalinowski/fix-lsif-theory

Fix up Theory that wasn't actually using the test parameters
......@@ -59,11 +59,9 @@ Namespace Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests
Assert.Equal(referencePath, DirectCast(metadataReference, PortableExecutableReference).FilePath)
End Sub
#Disable Warning IDE0060 ' Remove unused parameter - https://github.com/dotnet/roslyn/issues/44224
<Theory>
<CombinatorialData>
Public Async Sub TestSourceFilePathMappingWithDriveLetters(<CombinatorialValues("F:", "F:\")> from As String, <CombinatorialValues("F:", "F:\")> [to] As String)
#Enable Warning IDE0060 ' Remove unused parameter
Public Async Sub TestSourceFilePathMappingWithDriveLetters(<CombinatorialValues("F:", "F:\")> from As String, <CombinatorialValues("T:", "T:\")> [to] As String)
Dim compilerInvocation = Await Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.CompilerInvocation.CreateFromJsonAsync("
{
""tool"": ""csc"",
......@@ -72,28 +70,8 @@ Namespace Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests
""sourceRootPath"": ""F:\\"",
""pathMappings"": [
{
""from"": ""F:\\"",
""to"": ""T:\\""
}]
}")
Dim syntaxTree = Assert.Single(compilerInvocation.Compilation.SyntaxTrees)
Assert.Equal("T:\SourceFile.cs", syntaxTree.FilePath)
End Sub
<Fact>
Public Async Sub TestSourceFilePathMappingWithDriveLetterOnly()
Dim compilerInvocation = Await Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.CompilerInvocation.CreateFromJsonAsync("
{
""tool"": ""csc"",
""arguments"": ""/noconfig /nowarn:1701,1702 /fullpaths /define:DEBUG F:\\SourceFile.cs /target:library /out:F:\\Output.dll"",
""projectFilePath"": ""F:\\Project.csproj"",
""sourceRootPath"": ""F:\\"",
""pathMappings"": [
{
""from"": ""F:\\"",
""to"": ""T:""
""from"": """ + from.Replace("\", "\\") + """,
""to"": """ + [to].Replace("\", "\\") + """
}]
}")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册