From b06eb9c855070c9eff9eda347638e8a902aef87d Mon Sep 17 00:00:00 2001 From: psfinaki Date: Thu, 20 Jun 2024 16:59:21 +0200 Subject: [PATCH 1/3] up --- vsintegration/tests/Salsa/salsa.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vsintegration/tests/Salsa/salsa.fs b/vsintegration/tests/Salsa/salsa.fs index 48fa3b431f3..42789a58a68 100644 --- a/vsintegration/tests/Salsa/salsa.fs +++ b/vsintegration/tests/Salsa/salsa.fs @@ -91,7 +91,7 @@ module internal Salsa = | _ -> failwith "multiple projects found" match project with | null -> - let project = GlobalEngine().LoadProject(projectFileName) + let project = GlobalEngine().LoadProject(projectFileName, "4.0") // Set global properties. SetGlobalProperty(project, "AssemblySearchPaths", "{HintPathFromItem};{TargetFrameworkDirectory};{RawFileName}") SetGlobalProperty(project, "BuildingInsideVisualStudio", "true") From 123327014505c8d8c9db6ccea9a5d2324b1df069 Mon Sep 17 00:00:00 2001 From: psfinaki Date: Thu, 20 Jun 2024 19:38:44 +0200 Subject: [PATCH 2/3] Skipping remaining tests --- .../Tests.LanguageService.Completion.fs | 34 +++++++++++++++++++ .../Tests.LanguageService.ErrorList.fs | 10 ++++++ .../Tests.LanguageService.GotoDefinition.fs | 2 ++ .../Tests.LanguageService.ParameterInfo.fs | 22 ++++++++++++ .../Tests.LanguageService.QuickInfo.fs | 34 +++++++++++++++++++ .../Tests.LanguageService.Script.fs | 2 ++ .../Tests.ProjectSystem.Miscellaneous.fs | 4 +++ .../Tests.ProjectSystem.Project.fs | 2 ++ .../Tests.ProjectSystem.References.fs | 4 +++ .../Tests.ProjectSystem.UpToDate.fs | 6 ++++ 10 files changed, 120 insertions(+) diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs index 9cc1ed259d9..a29cd2574a9 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs @@ -349,6 +349,7 @@ type UsingMSBuild() as this = AssertAutoCompleteCompletionListIsEmptyNoCoffeeBreak c "this." [] + [] [] member this.``TypeProvider.VisibilityChecksForGeneratedTypes``() = let extraRefs = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")] @@ -451,6 +452,7 @@ type UsingMSBuild() as this = AssertCtrlSpaceCompleteContains code "(*$*)x.Len" ["Length"] [] [] + [] member public this.``Query.CompletionInJoinOn``() = let code = [ @@ -1186,6 +1188,7 @@ for i in 0..a."] [] [] + [] member public this.``Query.GroupJoin.CompletionInIncorrectJoinRelations``() = let code = [ @@ -1198,6 +1201,7 @@ for i in 0..a."] AssertCtrlSpaceCompleteContains code "(x." ["CompareTo"] ["abs"] AssertCtrlSpaceCompleteContains code "? y." ["Chars"; "Length"] ["abs"] + [] [] member public this.``Query.Join.CompletionInIncorrectJoinRelations``() = let code = @@ -2119,6 +2123,7 @@ let x = new MyClass2(0) [] [] [] + [] // This test case checks Pressing ctrl+space on the provided Type instance method shows list of valid completions member this.``TypeProvider.EditorHideMethodsAttribute.InstanceMethod.CtrlSpaceCompletionContains``() = this.AssertCtrlSpaceCompletionContains( @@ -2131,6 +2136,7 @@ let x = new MyClass2(0) [] [] + [] [] // This test case checks Pressing ctrl+space on the provided Type Event shows list of valid completions member this.``TypeProvider.EditorHideMethodsAttribute.Event.CtrlSpaceCompletionContains``() = @@ -2193,6 +2199,7 @@ let x = new MyClass2(0) "s." [] + [] [] member this.``QueryExpression.CtrlSpaceSmokeTest0``() = this.VerifyCtrlSpaceListContainAllAtStartOfMarker( @@ -2204,6 +2211,7 @@ let x = new MyClass2(0) addtlRefAssy=standard40AssemblyRefs ) [] + [] [] member this.``QueryExpression.CtrlSpaceSmokeTest0b``() = this.VerifyCtrlSpaceListContainAllAtStartOfMarker( @@ -2214,6 +2222,7 @@ let x = new MyClass2(0) list = ["query"], addtlRefAssy=standard40AssemblyRefs ) + [] [] [] member this.``QueryExpression.CtrlSpaceSmokeTest1``() = @@ -2225,6 +2234,7 @@ let x = new MyClass2(0) list = ["select"], addtlRefAssy=standard40AssemblyRefs ) + [] [] [] member this.``QueryExpression.CtrlSpaceSmokeTest1b``() = @@ -2240,6 +2250,7 @@ let x = new MyClass2(0) [] [] + [] member this.``QueryExpression.CtrlSpaceSmokeTest2``() = this.VerifyCtrlSpaceListContainAllAtStartOfMarker( fileContents = """ @@ -2251,6 +2262,7 @@ let x = new MyClass2(0) [] + [] [] member this.``QueryExpression.CtrlSpaceSmokeTest3``() = this.VerifyCtrlSpaceListContainAllAtStartOfMarker( @@ -2340,6 +2352,7 @@ let x = new MyClass2(0) /// This is the case where at (*TYPING*) we first type 1...N-1 characters of the target custom operation and then invoke the completion list, and we check that the completion list contains the custom operation [] [] + [] member this.``QueryExpression.CtrlSpaceSystematic1``() = let rec strictPrefixes (s:string) = seq { if s.Length > 1 then let s = s.[0..s.Length-2] in yield s; yield! strictPrefixes s} for customOperation in ["select";"skip";"contains";"groupJoin"] do @@ -2725,6 +2738,7 @@ let x = query { for bbbb in abbbbc(*D0*) do this.WordByWordSystematicTestWithSpecificExpectations(prefix, suffixes, lines, [""], knownFailures) + [] [] /// This is the case where (*TYPING*) nothing has been typed yet and we invoke the completion list /// This is a known failure right now for some of the example files above. @@ -5353,6 +5367,7 @@ let x = query { for bbbb in abbbbc(*D0*) do gpatcc.AssertExactly(0,0) [] + [] [] // Custom operators appear in Intellisense list after entering a valid query operator // on the previous line and invoking Intellisense manually @@ -5371,6 +5386,7 @@ let x = query { for bbbb in abbbbc(*D0*) do marker = "do ma", contained = [ "maxBy"; "maxByNullable"; ]) + [] [] [] // Custom operators appear in Intellisense list after entering a valid query operator @@ -5577,6 +5593,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [] [] // This test case checks that autocomplete on the provided Type DOES NOT show System.Object members + [] member this.``TypeProvider.EditorHideMethodsAttribute.Type.DoesnotContain``() = this.VerifyDotCompListDoesNotContainAnyAtStartOfMarker( fileContents = """ @@ -5589,6 +5606,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [] [] [] + [] // This test case checks if autocomplete on the provided Type shows only the Event1 elements member this.``TypeProvider.EditorHideMethodsAttribute.Type.Contains``() = this.VerifyDotCompListContainAllAtStartOfMarker( @@ -5602,6 +5620,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [] [] [] + [] // This test case checks if autocomplete on the provided Type shows the instance method IM1 member this.``TypeProvider.EditorHideMethodsAttribute.InstanceMethod.Contains``() = this.VerifyDotCompListContainAllAtStartOfMarker( @@ -5612,6 +5631,7 @@ let x = query { for bbbb in abbbbc(*D0*) do list = ["IM1"], addtlRefAssy = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) + [] [] [] // This test case checks that nested types show up only statically and not on instances @@ -5635,6 +5655,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [] [] [] + [] // This test case checks if autocomplete on the provided Event shows only the AddHandler/RemoveHandler elements member this.``TypeProvider.EditorHideMethodsAttribute.Event.Contain``() = this.VerifyDotCompListContainAllAtStartOfMarker( @@ -5660,6 +5681,7 @@ let x = query { for bbbb in abbbbc(*D0*) do [] [] [] + [] // This test case checks if autocomplete on the provided Property (the type of which is not synthetic) shows the usual elements... like GetType() // 1. I think it does not make sense to use this attribute on a synthetic property unless it's type is also synthetic (already covered) // 2. You can see this as a "negative case" (to check that the usage of the attribute is harmless) @@ -7602,6 +7624,7 @@ let rec f l = list = [""]) [] + [] member this.``NonApplicableExtensionMembersDoNotAppear.Bug40379``() = let code = [ "open System.Xml.Linq" @@ -7649,6 +7672,7 @@ let rec f l = marker = "(*MarkerSameAssemb*)", list = ["fieldInternal";"MethodInternal"]) + [] [] member this.``QueryExpression.DotCompletionSmokeTest1``() = this.VerifyDotCompListContainAllAtStartOfMarker( @@ -7660,6 +7684,8 @@ let rec f l = list = ["Chars";"Length"], addtlRefAssy=standard40AssemblyRefs) + [] + [] member this.``QueryExpression.DotCompletionSmokeTest2``() = this.VerifyDotCompListContainAllAtStartOfMarker( fileContents = """ @@ -7669,6 +7695,7 @@ let rec f l = list = ["Chars"; "Length"], addtlRefAssy=standard40AssemblyRefs ) + [] [] member this.``QueryExpression.DotCompletionSmokeTest0``() = this.VerifyDotCompListContainAllAtStartOfMarker( @@ -7680,6 +7707,7 @@ let rec f l = addtlRefAssy=standard40AssemblyRefs ) + [] [] member this.``QueryExpression.DotCompletionSmokeTest3``() = this.VerifyDotCompListContainAllAtStartOfMarker( @@ -7691,6 +7719,7 @@ let rec f l = addtlRefAssy=standard40AssemblyRefs ) + [] [] member this.``QueryExpression.DotCompletionSystematic1``() = for customOperation in ["select";"sortBy";"where"] do @@ -7750,6 +7779,7 @@ let rec f l = addtlRefAssy=standard40AssemblyRefs) [] + [] member public this.``QueryExpression.InsideJoin.Bug204147``() = this.VerifyDotCompListContainAllAtStartOfMarker( fileContents = """ @@ -7830,6 +7860,7 @@ let rec f l = [] [] // Intellisense still appears on arguments when the operator is used in error + [] member public this.``Query.HasErrors2``() = this.AssertDotCompletionListInQuery( fileContents = """ @@ -7844,6 +7875,7 @@ let rec f l = list = ["ProductID";"ProductName"] ) [] + [] [] // Shadowed variables have correct Intellisense member public this.``Query.ShadowedVariables``() = @@ -7861,6 +7893,7 @@ let rec f l = list = ["Category";"ProductName"] ) [] + [] [] // Intellisense works correctly in a nested query member public this.``Query.InNestedQuery``() = @@ -7879,6 +7912,7 @@ let rec f l = this.VerifyDotCompListContainAllAtStartOfMarker(fileContents, "(*Marker2*)", ["Equals";"CompareTo"], queryAssemblyRefs ) + [] [] [] // Intellisense works correctly in a nested expression within a lamda diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs index 3c3c452b0c3..ea83c6ed7e1 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs @@ -133,6 +133,7 @@ type UsingMSBuild() as this = failwithf "The error list number is not the expected %d" num [] + [] member public this.``OverloadsAndExtensionMethodsForGenericTypes``() = let fileContent = """ @@ -212,6 +213,7 @@ let g (t : T) = t.Count() CheckErrorList content (assertExpectedErrorMessages expectedMessages) + [] [] member public this.``Query.InvalidJoinRelation.GroupJoin``() = let content = """ @@ -228,6 +230,7 @@ let x = query { | errs -> Assert.Fail("Unexpected content of error list") + [] [] member public this.``Query.NonOpenedNullableModule.Join``() = let content = """ @@ -245,6 +248,7 @@ let t = | errs -> Assert.Fail("Unexpected content of error list") + [] [] member public this.``Query.NonOpenedNullableModule.GroupJoin``() = let content = """ @@ -263,6 +267,7 @@ let t = Assert.Fail("Unexpected content of error list") + [] [] member public this.``Query.InvalidJoinRelation.Join``() = let content = """ @@ -383,6 +388,7 @@ type staticInInterface = [] [] + [] [] member public this.``TypeProvider.MultipleErrors`` () = let tpRef = PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll") @@ -444,6 +450,7 @@ type staticInInterface = [] + [] [] [] //This test case Verify the Error List shows the correct error message when the static parameter type is invalid @@ -473,6 +480,7 @@ type staticInInterface = [] [] [] + [] //This test case Verify that Error List shows the correct error message when Type Provider that takes two static parameter is given only one static parameter. member public this.``TypeProvider.StaticParameters.IncorrectNumberOfParameter `` () = @@ -484,6 +492,7 @@ type staticInInterface = this.VerifyErrorListContainedExpectedString(fileContent,expectedStr, addtlRefAssy = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] [] member public this.``TypeProvider.ProhibitedMethods`` () = let cases = @@ -512,6 +521,7 @@ type staticInInterface = num = 1) [] + [] [] [] //This test case Verify that there is No Error list count in the Error list item when the file content is correct. diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs index ed89e611726..0327c56ec25 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs @@ -172,6 +172,7 @@ type UsingMSBuild() = [] [] // This test case check the GotoDefinition (i.e. the TypeProviderDefinitionLocation Attribute) + [] // We expect the correct FilePath, Line and Column on provided: Type, Event, Method, and Property // TODO: add a case for a provided Field member public this.``GotoDefinition.TypeProvider.DefinitionLocationAttribute``() = @@ -337,6 +338,7 @@ type UsingMSBuild() = ) [] + [] member public this.``GotoDefinition.ProvidedMemberNoDefinitionLocationAttribute``() = let useCases = [ diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs index 84ba5968e82..95e4d4d39b0 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs @@ -324,6 +324,7 @@ type UsingMSBuild() = [] [] [] + [] //This test verifies that ParamInfo on a provided type that exposes one (static) method that takes one argument works normally. member public this.``TypeProvider.StaticMethodWithOneParam`` () = let fileContent = """ @@ -335,6 +336,7 @@ type UsingMSBuild() = [] [] [] + [] //This test verifies that ParamInfo on a provided type that exposes a (static) method that takes >1 arguments works normally. member public this.``TypeProvider.StaticMethodWithMoreParam`` () = let fileContent = """ @@ -348,6 +350,7 @@ type UsingMSBuild() = [] //This test case verify the TypeProvider static method return type or colon content of the method //This test verifies that ParamInfo on a provided type that exposes one (static) method that takes one argument + [] //and returns something works correctly (more precisely, it checks that the return type is 'int') member public this.``TypeProvider.StaticMethodColonContent`` () = let fileContent = """ @@ -360,6 +363,7 @@ type UsingMSBuild() = [] [] [] + [] //This test verifies that ParamInfo on a provided type that exposes a Constructor that takes no argument works normally. member public this.``TypeProvider.ConstructorWithNoParam`` () = let fileContent = """ @@ -371,6 +375,7 @@ type UsingMSBuild() = [] [] [] + [] //This test verifies that ParamInfo on a provided type that exposes a Constructor that takes one argument works normally. member public this.``TypeProvider.ConstructorWithOneParam`` () = let fileContent = """ @@ -382,6 +387,7 @@ type UsingMSBuild() = [] [] [] + [] //This test verifies that ParamInfo on a provided type that exposes a Constructor that takes >1 argument works normally. member public this.``TypeProvider.ConstructorWithMoreParam`` () = let fileContent = """ @@ -392,6 +398,7 @@ type UsingMSBuild() = [] [] + [] [] //This test verifies that ParamInfo on a provided type that exposes a static parameter that takes >1 argument works normally. member public this.``TypeProvider.Type.WhenOpeningBracket`` () = @@ -403,6 +410,7 @@ type UsingMSBuild() = [] [] + [] [] //This test verifies that after closing bracket ">" the ParamInfo isn't showing on a provided type that exposes a static parameter that takes >1 argument works normally. //This is a regression test for Bug DevDiv:181000 @@ -413,6 +421,7 @@ type UsingMSBuild() = this.VerifyNoParameterInfoAtStartOfMarker(fileContent,"(*Marker*)", addtlRefAssy = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) + [] [] [] [] @@ -1195,9 +1204,11 @@ We really need to rewrite some code paths here to use the real parse tree rather let r = ^FOO^(^42,^"$"^) """) [] + [] member public this.``LocationOfParams.EvenWhenOverloadResolutionFails.Case1``() = this.TestParameterInfoLocationOfParams("""let a = new ^System.IO.FileStream^(^$^)""") + [] [] member public this.``LocationOfParams.EvenWhenOverloadResolutionFails.Case2``() = this.TestParameterInfoLocationOfParams(""" @@ -1381,12 +1392,14 @@ We really need to rewrite some code paths here to use the real parse tree rather ) [] + [] member public this.``LocationOfParams.TypeProviders.Basic``() = this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts(""" type U = ^N1.T^<^ "fo$o",^ 42 ^>""", additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] member public this.``LocationOfParams.TypeProviders.BasicNamed``() = this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts(""" type U = ^N1.T^<^ "fo$o",^ ParamIgnored=42 ^>""", @@ -1472,6 +1485,7 @@ We really need to rewrite some code paths here to use the real parse tree rather additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] member public this.``LocationOfParams.TypeProviders.BasicWithinExpr.DoesNotInterfereWithOuterFunction``() = this.TestParameterInfoLocationOfParams(""" let f() = @@ -1480,17 +1494,20 @@ We really need to rewrite some code paths here to use the real parse tree rather additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] member public this.``LocationOfParams.TypeProviders.Bug199744.ExcessCommasShouldNotAssertAndShouldGiveInfo.Case1``() = this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts(""" type U = ^N1.T^<^ "fo$o",^ 42,^ ,^ ^>""", additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] member public this.``LocationOfParams.TypeProviders.Bug199744.ExcessCommasShouldNotAssertAndShouldGiveInfo.Case2``() = this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts(""" type U = ^N1.T^<^ "fo$o",^ ,^ ^>""", additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) + [] [] member public this.``LocationOfParams.TypeProviders.Bug199744.ExcessCommasShouldNotAssertAndShouldGiveInfo.Case3``() = this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts(""" @@ -1504,6 +1521,7 @@ We really need to rewrite some code paths here to use the real parse tree rather let x = new ^N1.T^<^ "fo$o",^ 42 ^>()""", additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) + [] [] member public this.``TypeProvider.FormatOfNamesOfSystemTypes``() = let code = ["""type TTT = N1.T< "foo", ParamIgnored=42 > """] @@ -1988,6 +2006,7 @@ We really need to rewrite some code paths here to use the real parse tree rather (*------------------------------------------IDE Query automation start -------------------------------------------------*) [] [] + [] // ParamInfo works normally for calls as query operator arguments // wroks fine In nested queries member public this.``Query.InNestedQuery``() = @@ -2010,6 +2029,7 @@ We really need to rewrite some code paths here to use the real parse tree rather [] // ParamInfo works normally for calls as query operator arguments // ParamInfo Still works when an error exists + [] member public this.``Query.WithErrors``() = let fileContents = """ let tuples = [ (1, 8, 9); (56, 45, 3)] @@ -2024,6 +2044,7 @@ We really need to rewrite some code paths here to use the real parse tree rather [] [] // ParamInfo works normally for calls as query operator arguments + [] member public this.``Query.OperatorWithParentheses``() = let fileContents = """ type Product() = @@ -2077,6 +2098,7 @@ We really need to rewrite some code paths here to use the real parse tree rather [] // ParamInfo works normally for calls as query operator arguments // ParamInfo Still works when there are overload methods with the same param count + [] member public this.``Query.OverloadMethod.InQuery``() = let fileContents = """ let numbers = [ 1;2; 8; 9; 15; 23; 3; 42; 4;0; 55;] diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs index f54db72b21e..5f7e70a62a1 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs @@ -197,6 +197,7 @@ type UsingMSBuild() = ) [] + [] member public this.``QuickInfo.HideBaseClassMembersTP``() = let fileContents = "type foo = HiddenMembersInBaseClass.HiddenBaseMembersTP(*Marker*)" @@ -277,6 +278,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") this.CheckTooltip(source, "Asyn", false, checkTooltip expectedTooltip) [] + [] [] member public this.``TypeProviders.NestedTypesOrder``() = let code = "type t = N1.TypeWithNestedTypes(*M*)" @@ -328,6 +330,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] //This is to test the correct TypeProvider Type message is shown or not in the TypeProviderXmlDocAttribute + [] member public this.``TypeProvider.XmlDocAttribute.Type.Comment``() = let fileContents = """ @@ -339,6 +342,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test for long message in the TypeProviderXmlDocAttribute for TypeProvider Type member public this.``TypeProvider.XmlDocAttribute.Type.WithLongComment``() = @@ -381,6 +385,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test the multi-language in the TypeProviderXmlDocAttribute for TypeProvider Type member public this.``TypeProvider.XmlDocAttribute.Type.LocalizedComment``() = @@ -395,6 +400,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] //This is to test the correct TypeProvider Constructor message is shown or not in the TypeProviderXmlDocAttribute + [] member public this.``TypeProvider.XmlDocAttribute.Constructor.Comment``() = let fileContents = """ @@ -406,6 +412,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test for long message in the TypeProviderXmlDocAttribute for TypeProvider Constructor member public this.``TypeProvider.XmlDocAttribute.Constructor.WithLongComment``() = @@ -419,6 +426,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test when the message is null in the TypeProviderXmlDocAttribute for TypeProvider Constructor member public this.``TypeProvider.XmlDocAttribute.Constructor.WithNullComment``() = @@ -432,6 +440,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test when there is empty message from the TypeProviderXmlDocAttribute for TypeProvider Constructor member public this.``TypeProvider.XmlDocAttribute.Constructor.WithEmptyComment``() = @@ -445,6 +454,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test the multi-language in the TypeProviderXmlDocAttribute for TypeProvider Constructor member public this.``TypeProvider.XmlDocAttribute.Constructor.LocalizedComment``() = @@ -457,6 +467,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] + [] [] [] //This is to test the correct TypeProvider event message is shown or not in the TypeProviderXmlDocAttribute @@ -471,6 +482,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") addtlRefAssy = [PathRelativeToTestAssembly( @"XmlDocAttributeWithAdequateComment.dll")]) [] + [] [] [] //This is to test the multi-language in the TypeProviderXmlDocAttribute for TypeProvider Event @@ -495,6 +507,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") this.AssertQuickInfoContainsAtEndOfMarker (fileContents, "Spl", "[] separator") [] + [] [] [] //This is to test for long message in the TypeProviderXmlDocAttribute for TypeProvider Event @@ -540,6 +553,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] + [] [] [] //This is to test the correct TypeProvider Method message is shown or not in the TypeProviderXmlDocAttribute @@ -553,6 +567,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") addtlRefAssy = [PathRelativeToTestAssembly( @"XmlDocAttributeWithAdequateComment.dll")]) [] + [] [] [] //This is to test the multi-language in the TypeProviderXmlDocAttribute for TypeProvider Method @@ -567,6 +582,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] + [] [] //This is to test for long message in the TypeProviderXmlDocAttribute for TypeProvider Method member public this.``TypeProvider.XmlDocAttribute.Method.WithLongComment``() = @@ -580,6 +596,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] + [] [] //This is to test when the message is null in the TypeProviderXmlDocAttribute for TypeProvider Method member public this.``TypeProvider.XmlDocAttribute.Method.WithNullComment``() = @@ -592,6 +609,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") addtlRefAssy = [PathRelativeToTestAssembly( @"XmlDocAttributeWithNullComment.dll")]) [] + [] [] [] //This is to test when there is empty message from the TypeProviderXmlDocAttribute for TypeProvider Method @@ -607,6 +625,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] + [] [] //This is to test the correct TypeProvider Property message is shown or not in the TypeProviderXmlDocAttribute member public this.``TypeProvider.XmlDocAttribute.Property.Comment``() = @@ -621,6 +640,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test the multi-language in the TypeProviderXmlDocAttribute for TypeProvider Property member public this.``TypeProvider.XmlDocAttribute.Property.LocalizedComment``() = @@ -634,6 +654,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test for long message in the TypeProviderXmlDocAttribute for TypeProvider Property member public this.``TypeProvider.XmlDocAttribute.Property.WithLongComment``() = @@ -646,6 +667,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] + [] [] //This is to test when the message is null in the TypeProviderXmlDocAttribute for TypeProvider Property member public this.``TypeProvider.XmlDocAttribute.Property.WithNullComment``() = @@ -660,6 +682,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This is to test when there is empty message from the TypeProviderXmlDocAttribute for TypeProvider Property member public this.``TypeProvider.XmlDocAttribute.Property.WithEmptyComment``() = @@ -674,6 +697,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") [] [] [] + [] //This test case Verify that when Hover over foo the correct quickinfo is displayed for TypeProvider static parameter //Dummy Type Provider exposes a parametric type (N1.T) that takes 2 static params (string * int) member public this.``TypeProvider.StaticParameters.Correct``() = @@ -722,6 +746,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") addtlRefAssy = [PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] [] [] member public this.``TypeProvider.StaticParameters.QuickInfo.OnTheErasedType``() = @@ -733,6 +758,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n") addtlRefAssy = ["System"; PathRelativeToTestAssembly(@"DummyProviderForLanguageServiceTesting.dll")]) [] + [] [] [] member public this.``TypeProvider.StaticParameters.QuickInfo.OnNestedErasedTypeProperty``() = @@ -1135,6 +1161,7 @@ let f (tp:ITypeProvider(*$$$*)) = tp.Invalidate this.AssertQuickInfoContainsAtEndOfMarker(fileContent,"'x","") // no tooltips for char literals [] + [] member public this.``QueryExpression.QuickInfoSmokeTest1``() = let fileContent = """let q = query { for x in ["1"] do select x }""" this.AssertQuickInfoContainsAtEndOfMarker(fileContent,"selec","custom operation: select", addtlRefAssy=standard40AssemblyRefs) @@ -1142,6 +1169,7 @@ let f (tp:ITypeProvider(*$$$*)) = tp.Invalidate this.AssertQuickInfoContainsAtEndOfMarker(fileContent,"selec","Calls" , addtlRefAssy=standard40AssemblyRefs) this.AssertQuickInfoContainsAtEndOfMarker(fileContent,"selec","Linq.QueryBuilder.Select" , addtlRefAssy=standard40AssemblyRefs ) + [] [] member public this.``QueryExpression.QuickInfoSmokeTest2``() = let fileContent = """let q = query { for x in ["1"] do join y in ["2"] on (x = y); select (x,y) }""" @@ -1150,6 +1178,7 @@ let f (tp:ITypeProvider(*$$$*)) = tp.Invalidate this.AssertQuickInfoContainsAtEndOfMarker(fileContent,"joi","Calls" , addtlRefAssy=standard40AssemblyRefs ) this.AssertQuickInfoContainsAtEndOfMarker(fileContent,"joi","Linq.QueryBuilder.Join" , addtlRefAssy=standard40AssemblyRefs ) + [] [] member public this.``QueryExpression.QuickInfoSmokeTest3``() = let fileContent = """let q = query { for x in ["1"] do groupJoin y in ["2"] on (x = y) into g; select (x,g) }""" @@ -2834,6 +2863,7 @@ query." this.AssertQuickInfoContainsAtStartOfMarker (fileContent, "(*Marker3*)", "XmlComment M3") [] + [] member public this.XmlDocCommentsForArguments() = let fileContent = """ type bar() = @@ -3228,6 +3258,7 @@ query." [] [] // QuickInfo still works on valid operators in a query with errors elsewhere in it + [] member public this.``Query.WithError2``() = let fileContent =""" open DataSource @@ -3273,6 +3304,7 @@ query." this.AssertQuickInfoInQuery (fileContent, "(*Mark4*)", "custom operation: distinct") [] + [] [] // Arguments to query operators have correct QuickInfo // quickinfo should be corroct including when the operator is causing an error @@ -3288,6 +3320,7 @@ query." this.AssertQuickInfoContainsAtStartOfMarker (fileContent, "Type()", "System.Object.GetType() : System.Type",queryAssemblyRefs) [] + [] [] // Arguments to query operators have correct QuickInfo // quickinfo should be corroct In a nested query @@ -3312,6 +3345,7 @@ query." [] [] // A computation expression with its own custom operators has correct QuickInfo displayed + [] member public this.``Query.ComputationExpression.Method``() = let fileContent =""" open System.Collections.Generic diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs index b89a68816ea..10570c3151b 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Script.fs @@ -1329,6 +1329,7 @@ type UsingMSBuild() as this = // Must be explicitly referenced by compile. [] + [] [] [] member public this.``Fsx.CompileFsx_Bug5416_2``() = @@ -1544,6 +1545,7 @@ type UsingMSBuild() as this = [] [] + [] member public this.``TypeProvider.UnitsOfMeasure.SmokeTest1``() = let code = ["open Microsoft.FSharp.Data.UnitSystems.SI.UnitNames" diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs index 1132299f439..6af023de448 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs @@ -167,6 +167,7 @@ type Miscellaneous() = [] + [] member public this.``Automation.OutputGroup.OUTPUTLOC``() = this.MakeProjectAndDoWithProjectFile(["foo.fs"], [], this.MSBuildProjectMultiPlatform(["x86",""],"x86"), @@ -184,6 +185,7 @@ type Miscellaneous() = ) [] + [] member public this.``Automation.OutputGroups``() = DoWithTempFile "Test.fsproj" (fun file -> let text = TheTests.FsprojTextWithProjectReferences([],[],[],@" @@ -261,6 +263,7 @@ type Miscellaneous() = )) [] + [] member public this.``BuildAndClean``() = this.MakeProjectAndDoWithProjectFileAndConfigChangeNotifier(["foo.fs"], [], this.MSBuildProjectBoilerplate "Library", @@ -364,6 +367,7 @@ type Miscellaneous() = #endif [] + [] member public this.``DebuggingEXESucceeds``() = this.MakeProjectAndDoWithProjectFileAndConfigChangeNotifier(["foo.fs"], [], this.MSBuildProjectBoilerplate "Exe", diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs index 09ca0379e6a..ac6b083a0cb 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs @@ -833,6 +833,7 @@ type Project() = [] + [] member public this.``FsprojOutputWindow.ErrorOriginColumnsAreBase1``() = let (outputWindowPaneErrors : string list ref) = ref [] // output window pane errors let vso = VsMocks.vsOutputWindowPane(outputWindowPaneErrors) @@ -856,6 +857,7 @@ type Project() = ) [] + [] member public this.``FsprojOutputWindow.HighUnicodeCharactersAreProperlyDisplayed``() = let (outputWindowPaneErrors : string list ref) = ref [] // output window pane errors let vso = VsMocks.vsOutputWindowPane(outputWindowPaneErrors) diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.References.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.References.fs index f97e58ce654..f64efebaefe 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.References.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.References.fs @@ -80,6 +80,7 @@ type References() = ) [] + [] member this.``References.Bug787899.AddDuplicateUnresolved``() = // Let's create a run-of-the-mill project just to have a spare assembly around this.CreateDummyTestProjectBuildItAndDo(fun exe -> @@ -97,6 +98,7 @@ type References() = ) [] + [] member this.``References.Bug787899.AddDuplicateResolved``() = // Let's create a run-of-the-mill project just to have a spare assembly around this.CreateDummyTestProjectBuildItAndDo(fun exe -> @@ -244,6 +246,7 @@ type References() = TheTests.HelpfulAssertMatches ' ' "A reference to '.*' could not be added. A reference to the component '.*' already exists in the project." e.Message [] + [] member this.``ReferenceResolution.Bug4423.NonFxAssembly.BrowseTab.RelativeHintPath.InsideProjectDir``() = // Let's create a run-of-the-mill project just to have a spare assembly around this.CreateDummyTestProjectBuildItAndDo(fun exe -> @@ -276,6 +279,7 @@ type References() = ) [] + [] member this.``ReferenceResolution.Bug4423.NonFxAssembly.BrowseTab.RelativeHintPath.OutsideProjectDir``() = this.MakeProjectAndDo(["foo.fs"], [], "", (fun project -> // Let's create a run-of-the-mill diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs index 3403f4115bc..d21681de617 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.UpToDate.fs @@ -32,6 +32,7 @@ type UpToDate() = member public _.Init () = AssemblyResolver.addResolver () [] + [] member public this.ItemInputs () = this.MakeProjectAndDo(["file1.fs"], [], @" @@ -92,6 +93,7 @@ type UpToDate() = )) [] + [] member public this.PropertyInputs () = this.MakeProjectAndDo(["file1.fs"], [], @" @@ -140,6 +142,7 @@ type UpToDate() = )) [] + [] member public this.ProjectFile () = this.MakeProjectAndDoWithProjectFile(["file1.fs"], [], "", (fun project projFileName -> let configNameDebug = ConfigCanonicalName("Debug", "x86") @@ -163,6 +166,7 @@ type UpToDate() = )) [] + [] member public this.References () = let configNameDebug = ConfigCanonicalName("Debug", "x86") let output = VsMocks.vsOutputWindowPane(ref []) @@ -217,6 +221,7 @@ type UpToDate() = ) [] + [] member public this.OutputFiles () = this.MakeProjectAndDo(["file1.fs"], [], @" @@ -271,6 +276,7 @@ type UpToDate() = )) [] + [] member public this.ConfigChanges () = this.MakeProjectAndDo(["file1.fs"], [], "", (fun project -> let configNameDebugx86 = ConfigCanonicalName("Debug", "x86") From 211aa63a37da697517174d72a6640e1e0e4dd0fa Mon Sep 17 00:00:00 2001 From: psfinaki Date: Thu, 20 Jun 2024 22:37:48 +0200 Subject: [PATCH 3/3] up --- .../Tests.LanguageService.Completion.fs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs index a29cd2574a9..183b6a7d4c1 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.Completion.fs @@ -427,6 +427,7 @@ type UsingMSBuild() as this = [] member public this.``AdjacentToDot_21_Negative``() = testAutoCompleteAdjacentToDotNegative ".+." [] + [] member public this.``LambdaOverloads.Completion``() = let prologue = "open System.Linq" let cases = @@ -4462,6 +4463,7 @@ let x = query { for bbbb in abbbbc(*D0*) do /// FEATURE: References added to the project bring corresponding new .NET and F# items into scope. [] + [] member public this.``AfterAssemblyReferenceAdded``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() @@ -4484,6 +4486,7 @@ let x = query { for bbbb in abbbbc(*D0*) do Assert.AreNotEqual(0, completions.Length, "Expected some items in the list after adding a reference.") /// FEATURE: Updating the active project configuration influences the language service + [] [] member public this.``AfterUpdateProjectConfiguration``() = use _guard = this.UsingNewVS() @@ -4512,6 +4515,7 @@ let x = query { for bbbb in abbbbc(*D0*) do /// FEATURE: Updating the active project platform influences the language service [] + [] member public this.``AfterUpdateProjectPlatform``() = use _guard = this.UsingNewVS() let solution = this.CreateSolution() @@ -4589,6 +4593,7 @@ let x = query { for bbbb in abbbbc(*D0*) do /// In this bug there was an exception if the user pressed dot after a long identifier /// that was unknown. [] + [] member public this.``OfSystemWindows``() = let code = ["let y=new System.Windows."] let (_, _, file) = this.CreateSingleFileProject(code, references = ["System.Windows.Forms"])