提交 94415a93 编写于 作者: K Kevin Halverson

Finish implementation of GetReferenceDirectives in VB and enable test...

(fixes DevDiv 790235)
上级 06add106
......@@ -19,10 +19,9 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax
End Function
Friend Function GetReferenceDirectives(filter As Func(Of ReferenceDirectiveTriviaSyntax, Boolean)) As IList(Of ReferenceDirectiveTriviaSyntax)
' TODO: tomat
' enable test ReferenceManagerReuse_WithSyntaxTrees when implemented
' Return SyntaxNode.GetDirectives(Me.GetFirstToken(includeZeroWidth:=True), filter)
Return SpecializedCollections.EmptyList(Of ReferenceDirectiveTriviaSyntax)()
' #r directives are always on the first token of the compilation unit.
Dim firstToken = CType(Me.GetFirstToken(includeZeroWidth:=True), SyntaxNodeOrToken)
Return firstToken.GetDirectives(Of ReferenceDirectiveTriviaSyntax)(filter)
End Function
End Class
End Namespace
......
......@@ -1485,7 +1485,7 @@ End Class
Assert.False(c3.ReferenceManagerEquals(c2))
End Sub
<Fact(Skip:="790235")>
<Fact>
Public Sub ReferenceManagerReuse_WithSyntaxTrees()
Dim ta = Parse("Imports System")
Dim tb = Parse("Imports System", options:=TestOptions.Script)
......@@ -1536,12 +1536,6 @@ End Class
Dim ars = arc.ReplaceSyntaxTree(tc, ts)
Assert.True(arc.ReferenceManagerEquals(ars))
Dim ar3 = arc.ReplaceSyntaxTree(tc, ta)
Assert.True(arc.ReferenceManagerEquals(ar3))
Dim as1 = ars.ReplaceSyntaxTree(tr, ts)
Assert.False(ars.ReferenceManagerEquals(as1))
End Sub
Private Class EvolvingTestReference
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册