Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/service/InteractiveCheckerTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ let input =
let ``Test ranges - namespace`` () =
let res = parseAndExtractRanges input
printfn "Test ranges - namespace, res = %A" res
res |> shouldEqual [("N", ((4, 4), (6, 0))); ("Sample", ((4, 9), (4, 15)))]
res |> shouldEqual [("N", ((4, 4), (5, 4))); ("Sample", ((4, 9), (4, 15)))]

let input2 =
"""
Expand All @@ -97,4 +97,4 @@ let input3 =
let ``Test ranges - global namespace`` () =
let res = parseAndExtractRanges input3
printfn "Test ranges - global namespace, res = %A" res
res |> shouldEqual [("", ((4, 4), (6, 0))); ("Sample", ((4, 9), (4, 15)))]
res |> shouldEqual [("", ((4, 4), (5, 4))); ("Sample", ((4, 9), (4, 15)))]
2 changes: 1 addition & 1 deletion tests/service/StructureTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ let (=>) (source: string) (expectedRanges: (Range * Range) list) =
reraise()

[<Test>]
let ``empty file``() = "" => [ (1, 0, 2, 0), (1, 0, 2, 0) ]
let ``empty file``() = "" => []

[<Test>]
let ``nested module``() =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1531,17 +1531,24 @@ let x = new MyClass2(0)
[<Test>]
member public this.``AfterConstructor.5039_1``() =
AssertAutoCompleteContainsNoCoffeeBreak
[ "let someCall(x) = null"
"let xe = someCall(System.IO.StringReader()." ]
[
"""
let someCall(x) = null
let xe = someCall(System.IO.StringReader().
""" ]
"StringReader()."
[ "ReadBlock" ] // should contain (StringReader)
[ "LastIndexOfAny" ] // should not contain (String)

[<Test>]
member public this.``AfterConstructor.5039_1.CoffeeBreak``() =
AssertAutoCompleteContains
[ "let someCall(x) = null"
"let xe = someCall(System.IO.StringReader()." ]
[
"""
let someCall(x) = null
let xe = someCall(System.IO.StringReader().
"""
]
"StringReader()."
[ "ReadBlock" ] // should contain (StringReader)
[ "LastIndexOfAny" ] // should not contain (String)
Expand Down Expand Up @@ -4913,8 +4920,12 @@ let x = query { for bbbb in abbbbc(*D0*) do

[<Test>]
member this.``BadCompletionAfterQuicklyTyping.Bug130733.NowWorks``() =
let code = [ "let someCall(x) = null"
"let xe = someCall(System.IO.StringReader() "]
let code = [
"""
let someCall(x) = null
let xe = someCall(System.IO.StringReader()
"""
]
let (_, _, file) = this.CreateSingleFileProject(code)

TakeCoffeeBreak(this.VS)
Expand Down
4 changes: 3 additions & 1 deletion vsintegration/tests/UnitTests/SignatureHelpProviderTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ type foo5 = N1.T<Param1=1,ParamIgnored= >
("type foo5 = N1.T<Param1=1,ParamIgnored",Some ("[132..160)", 1, 2, Some "ParamIgnored"));
("type foo5 = N1.T<Param1=1,ParamIgnored=",Some ("[132..160)", 1, 2, Some "ParamIgnored"))])
//Test case 5
( """let _ = System.DateTime(""",
( """
let _ = System.DateTime(
""",
[("let _ = System.DateTime(", Some ("[8..24)", 0, 0, None)) ])
]

Expand Down
5 changes: 1 addition & 4 deletions vsintegration/tests/UnitTests/VisualFSharp.UnitTests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingPackageVersion)" PrivateAssets="all" ExcludeAssets="runtime;contentFiles;build;analyzers;native" />
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="$(MicrosoftVisualStudioValidationPackageVersion)" PrivateAssets="all" ExcludeAssets="runtime;contentFiles;build;analyzers;native" />
<PackageReference Include="NUnit" Version="$(NUnitPackageVersion)" />
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnitTestAdapterPackageVersion)" />
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTuplePackageVersion)" />
<PackageReference Include="VSSDK.VSHelp" Version="$(VSSDKVSHelpPackageVersion)" />
<PackageReference Include="VSSDK.VSLangProj.8" Version="$(VSSDKVSLangProj8PackageVersion)" />
Expand Down Expand Up @@ -242,10 +243,6 @@
<PackageReference Include="Microsoft.VisualStudio.Utilities" Version="$(MicrosoftVisualStudioUtilitiesPackageVersion)" PrivateAssets="all" ExcludeAssets="runtime;contentFiles;build;analyzers;native" />
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(MicrosoftVisualStudioThreadingPackageVersion)" PrivateAssets="all" ExcludeAssets="runtime;contentFiles;build;analyzers;native" />
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="$(MicrosoftVisualStudioValidationPackageVersion)" PrivateAssets="all" ExcludeAssets="runtime;contentFiles;build;analyzers;native" />
<PackageReference Include="NUnit" Version="$(NUnitPackageVersion)" />
<PackageReference Include="System.ValueTuple" Version="$(SystemValueTuplePackageVersion)" />
<PackageReference Include="VSSDK.VSHelp" Version="$(VSSDKVSHelpPackageVersion)" PrivateAssets="all" ExcludeAssets="runtime;contentFiles;build;analyzers;native" />
<PackageReference Include="VSSDK.VSLangProj.8" Version="$(VSSDKVSLangProj8PackageVersion)" PrivateAssets="all" ExcludeAssets="contentFiles;build;analyzers;native" />
</ItemGroup>

</Project>