93 references to NewLines
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (93)
Syntax\SyntaxEquivalenceTests.vb (93)
51Dim tree2 = tree1.WithInsertAt(0, NewLines("#if true \n\n#end if")) 60Dim tree2 = tree1.WithInsertAt(0, NewLines("#if false \n\n#end if")) 69Dim tree2 = tree1.WithInsertAt(0, NewLines("namespace N \n end namespace")) 76Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n end namespace")) 77Dim tree2 = tree1.WithInsertBefore("end", NewLines("class C \n end class \n")) 84Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n end namespace")) 92Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n dim z = 0 \n end sub \n end class \n end namespace")) 100Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n end namespace")) 108Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n dim z = 0 \n end sub \n end class \n end namespace")) 116Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n end class \n end namespace")) 117Dim tree2 = tree1.WithInsertBefore("end", NewLines("sub Goo() \n end sub \n")) 124Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n end sub \n end class \n end namespace")) 125Dim tree2 = tree1.WithInsertBefore("end", NewLines("dim i as Integer \n ")) 132Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n dim z = 0 \n end sub \n end class \n end namespace")) 140Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n const i = 5 \n end sub \n end class \n end namespace")) 148Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("enum E \n i = 5 \n end enum")) 156Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n <Obsolete(true)>\nclass C \n const i = 5 \n end class \n end namespace")) 164Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Console.Write(0) \n end sub \n end class \n end namespace")) 172Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("Imports System \n namespace N \n class C \n sub Goo() \n Console.Write(0) \n end sub \n end class \n end namespace")) 180Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n Console.Write(0) \n end sub \n end class")) 188Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n Console.Write(0) \n end sub \n end class")) 196Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n Console.Write(0) \n end sub \n end class")) 197Dim tree2 = tree1.WithInsertBefore("class", NewLines("' Comment\n")) 204Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n Console.Write(0) \n end sub \n end class")) 212Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n Console.Write(0) \n end sub \n end class")) 213Dim tree2 = tree1.WithInsertBefore("class", NewLines("''' Comment \n")) 220Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n end sub \n end class")) 221Dim tree2 = tree1.WithReplaceFirst(NewLines("sub Goo() \n end sub \n"), NewLines("\n #if true \n sub Goo() \n end sub \n #end if \n")) 228Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n end sub \n end class")) 229Dim tree2 = tree1.WithReplaceFirst(NewLines("sub Goo() \n end sub \n"), NewLines("\n #if false \n sub Goo() \n end sub \n #end if \n")) 236Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n dim i as Integer \n end sub \n end class")) 237Dim tree2 = tree1.WithReplaceFirst(NewLines("dim i as Integer \n"), NewLines("\n #if true \n dim i as Integer \n #end if \n")) 244Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n dim i as Integer \n end sub \n end class")) 245Dim tree2 = tree1.WithReplaceFirst(NewLines("dim i as Integer \n"), NewLines("\n #if false \n dim i as Integer \n #end if \n")) 252Dim text = NewLines("class C \n sub Goo() \n dim i as Integer \n end sub \n end class") 261Dim text = NewLines("Imports System \n Modle Program \n Sub Main(args As String()) \n \n End Sub \n End Module") 269Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Console.Write($""Hello{123:N1}"") \n end sub \n end class \n end namespace")) 281Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Dim x = <x>Text1</x> \n end sub \n end class \n end namespace")) 289Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Dim x = <x a=""attr1"">Text</x> \n end sub \n end class \n end namespace")) 297Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Dim x = <x attr1=""v"">Text</x> \n end sub \n end class \n end namespace")) 305Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Dim a = <x><![CDATA[Text1]]></x> \n end sub \n end class \n end namespace")) 313Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n sub Goo() \n Dim a = <x><!--Text1--></x> \n end sub \n end class \n end namespace")) 323Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n dim i = 5 \n dim j = 6 \n end class \n end namespace")) 331Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n dim i = 5 \n dim j = 6 \n end class \n end namespace")) 339Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n dim i = 5 \n end class \n end namespace")) 347Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n dim i As New C(5) \n end class \n end namespace")) 355Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n dim i, j As New C(5) \n end class \n end namespace")) 363Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n dim i = 5, j = 7 \n end class \n end namespace")) 374Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n const i = 5 \n end class \n end namespace")) 382Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("namespace N \n class C \n const i = 5, j = 7 \n end class \n end namespace")) 397Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) \n Body(1) \n End Sub \n End Module") 406Dim text = NewLines("Imports System \n Module Program \n Friend Sub Main(args As String()) \n \n End Sub \n End Module") 415Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) \n \n End Sub \n End Module") 424Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) \n \n End Sub \n End Module") 433Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) \n \n End Sub \n End Module") 442Dim text = NewLines("Imports System \n Module Program \n Sub Main(Optional arg As Integer = 123) \n \n End Sub \n End Module") 451Dim text = NewLines("Imports System \n Module Program \n Function Main(Optional arg As Integer = 123) \n \n End Function \n End Module") 460Dim text = NewLines("Imports System \n Module Program \n Function Main(Optional arg As Integer = 123) As Integer \n \n End Function \n End Module") 469Dim text = NewLines("Imports System \n Module Program \n Function Main(Optional arg As Integer = 123) As C \n \n End Function \n End Module") 478Dim text = NewLines("Imports System \n Module Program \n Function Main(Optional arg As Integer = 123) As <A(1)>C \n \n End Function \n End Module") 487Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) Handles E.Goo \n \n End Sub \n End Module") 496Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) Implements I.Goo \n \n End Sub \n End Module") 505Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) Implements I.Goo \n \n End Sub \n End Module") 514Dim text = NewLines("Imports System \n Module Program \n Sub Main(args As String()) Implements I.Goo \n \n End Sub \n End Module") 523Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n Console.Write(0) \n end sub \n end class")) 531Dim tree1 = VisualBasicSyntaxTree.ParseText(NewLines("class C \n sub Goo() \n end sub \n end class")) 532Dim tree2 = tree1.WithReplaceFirst(NewLines("sub Goo() \n end sub \n"), NewLines("' sub Goo() \n ' end sub \n")) 541Dim text = NewLines("Imports System \n Class Program \n Sub New(args As String()) \n Body(1) \n End Sub \n End Class") 550Dim text = NewLines("Imports System \n Class Program \n Sub New(args As String()) \n MyBase.New(1) \n End Sub \n End Class") 559Dim text = NewLines("Imports System \n Class Program \n Sub New(Optional arg As Integer = 123) \n \n End Sub \n End Class") 570Dim text = NewLines("Imports System \n Class C \n Shared Operator *(a As C, b As C) As Integer \n Return 0 \n End Operator \n End Class") 579Dim text = NewLines("Imports System \n Class C \n Shared Operator *(a As C, b As C) As Integer \n Return 0 \n End Operator \n End Class") 590Dim text = NewLines("Imports System \n Class Program \n Property P As Integer \n <A(1)>Get \n End Get \n Set(value As Integer) \n End Set \n End Property \n End Class") 599Dim text = NewLines("Imports System \n Class Program \n Property P As Integer \n Get \n End Get \n <A(1)>Set(value As Integer) \n End Set \n End Property \n End Class") 608Dim text = NewLines("Imports System \n Class Program \n Property P As Integer \n Get \n End Get \n Set(<A(1)>value As Integer) \n End Set \n End Property \n End Class") 617Dim text = NewLines("Imports System \n Class Program \n Property P(a As Integer = 123) \n Get \n End Get \n Set(value As Integer) \n End Set \n End Property \n End Class") 626Dim text = NewLines("Imports System \n Class Program \n Property P As Integer = 123 \n End Class") 635Dim text = NewLines("Imports System \n Class Program \n Property P(a As Integer = 123) As Integer = 1 \n End Class") 646Dim text = NewLines("Imports System \n Class Program \n Custom Event E As Action \n <A(1)>AddHandler(value As Action) \n End AddHandler \n RemoveHandler(value As Action) \n End RemoveHandler \n RaiseEvent() \n End RaiseEvent \n End Event \n End Class") 655Dim text = NewLines("Imports System \n Class Program \n Custom Event E As Action \n AddHandler(value As Action) \n End AddHandler \n <A(1)>RemoveHandler(value As Action) \n End RemoveHandler \n RaiseEvent() \n End RaiseEvent \n End Event \n End Class") 664Dim text = NewLines("Imports System \n Class Program \n Custom Event E As Action \n AddHandler(value As Action) \n End AddHandler \n RemoveHandler(value As Action) \n End RemoveHandler \n <A(1)>RaiseEvent() \n End RaiseEvent \n End Event \n End Class") 673Dim text = NewLines("Imports System \n Class Program \n Custom Event E As Action \n AddHandler(<A(1)>value As Action) \n End AddHandler \n RemoveHandler(value As Action) \n End RemoveHandler \n RaiseEvent() \n End RaiseEvent \n End Event \n End Class") 682Dim text = NewLines("Imports System \n Class Program \n Custom Event E As Action \n AddHandler(value As Action) \n End AddHandler \n RemoveHandler(<A(1)>value As Action) \n End RemoveHandler \n RaiseEvent() \n End RaiseEvent \n End Event \n End Class") 693Dim text = NewLines("Imports System \n Module Program \n Declare Ansi Function Goo Lib ""goo"" Alias ""bar"" () As Integer \n End Module") 702Dim text = NewLines("Imports System \n Module Program \n Declare Ansi Function Goo Lib ""goo"" Alias ""bar"" () As Integer \n End Module") 711Dim text = NewLines("Imports System \n Module Program \n Declare Ansi Function Goo Lib ""goo"" Alias ""bar"" () As Integer \n End Module") 720Dim text = NewLines("Imports System \n Module Program \n Declare Ansi Function Goo Lib ""goo"" Alias ""bar"" () As Integer \n End Module") 729Dim text = NewLines("Imports System \n Module Program \n Declare Ansi Function Goo Lib ""goo"" Alias ""bar"" () As Integer \n End Module")