diff --git a/Directory.Build.props b/Directory.Build.props index 7dfc324417d..baf55b19a83 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,7 @@ + $(FSharpLangVersion) $(MSBuildThisFileDirectory) true diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9c7f04f7d29..5d6e1282dd8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -321,6 +321,32 @@ stages: helixRepo: dotnet/fsharp jobs: + - job: WindowsLangVersionPreview + pool: + # The PR build definition sets this variable: + # WindowsMachineQueueName=Windows.vs2022.amd64.open + # and there is an alternate build definition that sets this to a queue that is always scouting the + # next preview of Visual Studio. + name: $(DncEngPublicBuildPool) + demands: ImageOverride -equals $(WindowsMachineQueueName) + timeoutInMinutes: 120 + steps: + - checkout: self + clean: true + + - script: eng\CIBuild.cmd -compressallmetadata -configuration Release /p:FSharpLangVersion=preview + displayName: Build + + - task: PublishBuildArtifacts@1 + displayName: Publish Build BinLog + condition: always() + continueOnError: true + inputs: + PathToPublish: '$(Build.SourcesDirectory)\artifacts\log/Release\Build.VisualFSharp.sln.binlog' + ArtifactName: 'Windows Release build binlogs' + ArtifactType: Container + parallel: true + # Windows With Compressed Metadata - job: WindowsCompressedMetadata variables: @@ -371,7 +397,7 @@ stages: displayName: Build / Integration Test continueOnError: true condition: eq(variables['_testKind'], 'testIntegration') - + - task: PublishTestResults@2 displayName: Publish Test Results inputs: diff --git a/eng/Build.ps1 b/eng/Build.ps1 index 89dcb57285e..a545a193f43 100644 --- a/eng/Build.ps1 +++ b/eng/Build.ps1 @@ -280,7 +280,7 @@ function BuildSolution([string] $solutionName, $nopack) { /v:$verbosity ` $suppressExtensionDeployment ` @properties - + $env:BUILDING_USING_DOTNET=$BUILDING_USING_DOTNET_ORIG } @@ -340,15 +340,15 @@ function TestUsingMSBuild([string] $testProject, [string] $targetFramework, [str if ($env:RunningAsPullRequest -ne "true" -and $noTestFilter -eq $false) { $args += " --filter TestCategory!=PullRequest" } - + if ($asBackgroundJob) { Write-Host("Starting on the background: $args") Write-Host("------------------------------------") - $bgJob = Start-Job -ScriptBlock { + $bgJob = Start-Job -ScriptBlock { & $using:dotnetExe test $using:testProject -c $using:configuration -f $using:targetFramework -v n --test-adapter-path $using:testadapterpath --logger "nunit;LogFilePath=$using:testLogPath" /bl:$using:testBinLogPath --blame --results-directory $using:ArtifactsDir\TestResults\$using:configuration - if ($LASTEXITCODE -ne 0) { - throw "Command failed to execute with exit code $($LASTEXITCODE): $using:dotnetExe $using:args" - } + if ($LASTEXITCODE -ne 0) { + throw "Command failed to execute with exit code $($LASTEXITCODE): $using:dotnetExe $using:args" + } } return $bgJob } else{ @@ -570,10 +570,10 @@ try { TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\" TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\" TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $coreclrTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\" - + # Collect output from background jobs Wait-job $bgJob | out-null - Receive-Job $bgJob -ErrorAction Stop + Receive-Job $bgJob -ErrorAction Stop } if ($testDesktop) { @@ -585,7 +585,7 @@ try { TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Compiler.Private.Scripting.UnitTests\FSharp.Compiler.Private.Scripting.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Compiler.Private.Scripting.UnitTests\" TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Build.UnitTests\FSharp.Build.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Build.UnitTests\" TestUsingXUnit -testProject "$RepoRoot\tests\FSharp.Core.UnitTests\FSharp.Core.UnitTests.fsproj" -targetFramework $desktopTargetFramework -testadapterpath "$ArtifactsDir\bin\FSharp.Core.UnitTests\" - + # Collect output from background jobs Wait-job $bgJob | out-null Receive-Job $bgJob -ErrorAction Stop diff --git a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj index 5f5f1a3b687..91418865d89 100644 --- a/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj +++ b/vsintegration/src/FSharp.ProjectSystem.PropertyPages/FSharp.ProjectSystem.PropertyPages.vbproj @@ -5,6 +5,7 @@ Library + latest true FSharp.ProjectSystem.PropertyPages true diff --git a/vsintegration/tests/Salsa/salsa.fs b/vsintegration/tests/Salsa/salsa.fs index 4d9d1815622..48fa3b431f3 100644 --- a/vsintegration/tests/Salsa/salsa.fs +++ b/vsintegration/tests/Salsa/salsa.fs @@ -299,8 +299,17 @@ module internal Salsa = newProjectSite /// Token types. - type TokenType = Text | Keyword | Comment | Identifier | String | Number | InactiveCode | PreprocessorKeyword | Operator - with override this.ToString() = + type TokenType = + | Text + | Keyword + | Comment + | Identifier + | String + | Number + | InactiveCode + | PreprocessorKeyword + | Operator + override this.ToString() = match this with | Text -> "Text" | Keyword -> "Keyword" diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs index 1ca8e79fdf8..fdcb06bde04 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorList.fs @@ -40,7 +40,7 @@ type UsingMSBuild() as this = let errorList = GetErrors(project) [for error in errorList do if (error.Severity = Microsoft.VisualStudio.FSharp.LanguageService.Severity.Warning) then - yield error] + yield error] let CheckErrorList (content : string) f : unit = let (_, project, file) = this.CreateSingleFileProject(content) diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorRecovery.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorRecovery.fs index 19bd078dfab..371d95e208e 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorRecovery.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ErrorRecovery.fs @@ -244,25 +244,26 @@ type UsingMSBuild() = [] member public this.``ErrorRecovery.5878_1``() = Helper.AssertMemberDataTipContainsInOrder - (this.TestRunner, - (*code *) - [ - "module Module =" - " /// Union comment" - " type Union =" - " /// Case comment" - " | Case of int" - "Module." - ] , - (* marker *) - "Module.", - (* completed item *) - "Case", - (* expect to see in order... *) - [ - "union case Module.Union.Case: int -> Module.Union"; - "Case comment"; - ] + ( + this.TestRunner, + (*code *) + [ + "module Module =" + " /// Union comment" + " type Union =" + " /// Case comment" + " | Case of int" + "Module." + ] , + (* marker *) + "Module.", + (* completed item *) + "Case", + (* expect to see in order... *) + [ + "union case Module.Union.Case: int -> Module.Union"; + "Case comment"; + ] ) diff --git a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs index b1049408fac..ed89e611726 100644 --- a/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs +++ b/vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.GotoDefinition.fs @@ -216,10 +216,10 @@ type UsingMSBuild() = // A0(*ColumnMarker*)1234567890 // B01234567890 // C01234567890 """, - "T(*GotoValDef*)", - "// A0(*ColumnMarker*)1234567890", - PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), - "(*ColumnMarker*)") + "T(*GotoValDef*)", + "// A0(*ColumnMarker*)1234567890", + PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), + "(*ColumnMarker*)") // This test case checks the type with space in between like N.``T T`` for GotoDefinition let ``Type.SpaceInTheType``() = @@ -228,10 +228,10 @@ type UsingMSBuild() = // A0(*ColumnMarker*)1234567890 // B01234567890 // C01234567890 """, - "T``", - "// A0(*ColumnMarker*)1234567890", - PathRelativeToTestAssembly(@"DefinitionLocationAttributeWithSpaceInTheType.dll"), - "(*ColumnMarker*)") + "T``", + "// A0(*ColumnMarker*)1234567890", + PathRelativeToTestAssembly(@"DefinitionLocationAttributeWithSpaceInTheType.dll"), + "(*ColumnMarker*)") // Basic scenario on a provided Constructor let ``Constructor.BasicScenario``() = @@ -241,10 +241,10 @@ type UsingMSBuild() = // A0(*ColumnMarker*)1234567890 // B01234567890 // C01234567890 """, - "T(*GotoValDef*)", - "// A0(*ColumnMarker*)1234567890", - PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), - "(*ColumnMarker*)") + "T(*GotoValDef*)", + "// A0(*ColumnMarker*)1234567890", + PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), + "(*ColumnMarker*)") // Basic scenario on a provided Method let ``Method.BasicScenario``() = @@ -253,10 +253,10 @@ type UsingMSBuild() = // A0(*ColumnMarker*)1234567890 // B01234567890 // C01234567890 """, - "M(*GotoValDef*)", - "// A0(*ColumnMarker*)1234567890", - PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), - "(*ColumnMarker*)") + "M(*GotoValDef*)", + "// A0(*ColumnMarker*)1234567890", + PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), + "(*ColumnMarker*)") // Basic scenario on a provided Property let ``Property.BasicScenario``() = @@ -265,10 +265,10 @@ type UsingMSBuild() = // A0(*ColumnMarker*)1234567890 // B01234567890 // C01234567890 """, - "StaticProp(*GotoValDef*)", - "// A0(*ColumnMarker*)1234567890", - PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), - "(*ColumnMarker*)") + "StaticProp(*GotoValDef*)", + "// A0(*ColumnMarker*)1234567890", + PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), + "(*ColumnMarker*)") // Basic scenario on a provided Event let ``Event.BasicScenario``() = @@ -278,10 +278,10 @@ type UsingMSBuild() = // A0(*ColumnMarker*)1234567890 // B01234567890 // C01234567890 """, - "Event1(*GotoValDef*)", - "// A0(*ColumnMarker*)1234567890", - PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), - "(*ColumnMarker*)") + "Event1(*GotoValDef*)", + "// A0(*ColumnMarker*)1234567890", + PathRelativeToTestAssembly(@"DefinitionLocationAttribute.dll"), + "(*ColumnMarker*)") // Actually execute all the scenarios... ``Type.BasicScenario``() diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs index 1a0e16a2aab..1132299f439 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Miscellaneous.fs @@ -496,42 +496,45 @@ type Miscellaneous() = [] member this.``MSBuildExtensibility.BrokenCompileDependsOn.WithRecovery`` () = - this.MakeProjectAndDoWithProjectFileAndConfigChangeNotifier(["foo.fs";"bar.fs"], [], -// define a legal 'Foo' configuration -@" - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 3 - ", fun project configChangeNotifier projFile -> - let projFileText = File.ReadAllText(projFile) - // We need to add text _after_ the import of Microsoft.FSharp.Targets. - let i = projFileText.IndexOf("", i) - let newProjFileText = projFileText.Insert(i+1, @" - - MyTarget;$(CompileDependsOn) - - - - ") - File.WriteAllText(projFile, newProjFileText) - project.Reload() - // Ensure we are not in 'Foo' config, and thus expect failure - let curCfgCanonicalName = this.GetCurrentConfigCanonicalName(project) - Assert.IsFalse(curCfgCanonicalName.StartsWith("Foo"), sprintf "default config should not be 'Foo'! in fact it had canonical name '%s'" curCfgCanonicalName) - // Now the project system is in a state where ComputeSourcesAndFlags will fail. - // Our goal is to at least be able to open individual source files and treat them like 'files outside a project' with regards to intellisense, etc. - // Also, if the user does 'Build', he will get an error which will help diagnose the problem. - let ipps = project :> IProvideProjectSite - let ips = ipps.GetProjectSite() - let expected = [| |] // Ideal behavior is [|"foo.fs";"bar.fs"|], and we could choose to improve this in the future. For now we are just happy to now throw/crash. - let actual = ips.CompilationSourceFiles - Assert.AreEqual(expected, actual, "project site did not report expected set of source files") - ) + this.MakeProjectAndDoWithProjectFileAndConfigChangeNotifier( + ["foo.fs";"bar.fs"], + [], + // define a legal 'Foo' configuration + @" + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 3 + ", + fun project configChangeNotifier projFile -> + let projFileText = File.ReadAllText(projFile) + // We need to add text _after_ the import of Microsoft.FSharp.Targets. + let i = projFileText.IndexOf("", i) + let newProjFileText = projFileText.Insert(i+1, @" + + MyTarget;$(CompileDependsOn) + + + + ") + File.WriteAllText(projFile, newProjFileText) + project.Reload() + // Ensure we are not in 'Foo' config, and thus expect failure + let curCfgCanonicalName = this.GetCurrentConfigCanonicalName(project) + Assert.IsFalse(curCfgCanonicalName.StartsWith("Foo"), sprintf "default config should not be 'Foo'! in fact it had canonical name '%s'" curCfgCanonicalName) + // Now the project system is in a state where ComputeSourcesAndFlags will fail. + // Our goal is to at least be able to open individual source files and treat them like 'files outside a project' with regards to intellisense, etc. + // Also, if the user does 'Build', he will get an error which will help diagnose the problem. + let ipps = project :> IProvideProjectSite + let ips = ipps.GetProjectSite() + let expected = [| |] // Ideal behavior is [|"foo.fs";"bar.fs"|], and we could choose to improve this in the future. For now we are just happy to now throw/crash. + let actual = ips.CompilationSourceFiles + Assert.AreEqual(expected, actual, "project site did not report expected set of source files") + ) [] member public this.TestBuildActions () = diff --git a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs index 8b56c8ae806..09ca0379e6a 100644 --- a/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs +++ b/vsintegration/tests/UnitTests/LegacyProjectSystem/Tests.ProjectSystem.Project.fs @@ -67,13 +67,15 @@ type Project() = member public this.``FsprojFileToSolutionExplorer.FileOrderInFsprojIsRespected.Case2``() = let compileItems = [@"A\B\D\foo.fs"; @"A\B\C\bar.fs"] let expect = Tree("References", ANYTREE, - Tree("A", - Tree("B", - Tree("D", - Tree("foo.fs", Nil, Nil), - Tree("C", - Tree("bar.fs", Nil, Nil), - Nil)), Nil), Nil)) + Tree("A", + Tree("B", + Tree("D", + Tree("foo.fs", Nil, Nil), + Tree("C", + Tree("bar.fs", Nil, Nil),Nil) + ), + Nil), + Nil)) // no alphabetization of files or folders this.``FsprojFileToSolutionExplorer.PositiveTest``(compileItems, "", expect) @@ -86,11 +88,14 @@ type Project() = " let expect = Tree("References", ANYTREE, - Tree("B", - Tree("foo.fs", Nil, Nil), - Tree("A", - Tree("bar.fs", Nil, Nil), - Nil))) + Tree("B", + Tree("foo.fs", Nil, Nil), + Tree("A", + Tree("bar.fs", Nil, Nil), + Nil + ) + ) + ) // Including folder should not put folder at front of other folders this.``FsprojFileToSolutionExplorer.PositiveTest``(compileItems, other, expect) @@ -103,10 +108,13 @@ type Project() = " let expect = Tree("References", ANYTREE, - Tree("foo.fs", Nil, - Tree("A", - Tree("bar.fs", Nil, Nil), - Nil))) + Tree("foo.fs", Nil, + Tree("A", + Tree("bar.fs", Nil, Nil), + Nil + ) + ) + ) // Including folder should not put folder at front of files this.``FsprojFileToSolutionExplorer.PositiveTest``(compileItems, other, expect) @@ -124,11 +132,15 @@ type Project() = " let expect = Tree("References", ANYTREE, - Tree("foo.fs", Nil, - Tree("A", - Tree("bar.fs", Nil, - Tree("qux.fs", Nil, Nil)), - Nil))) + Tree("foo.fs", Nil, + Tree("A", + Tree("bar.fs", Nil, + Tree("qux.fs", Nil, Nil) + ), + Nil + ) + ) + ) this.``FsprojFileToSolutionExplorer.PositiveTest``(compileItems, other, expect) @@ -141,10 +153,13 @@ type Project() = project.AddLinkedItem(project, [| f |], Array.create 1 (new VSADDRESULT())) |> ValidateOK ) let expect = Tree("References", ANYTREE, - Tree("Folder", - Tree("foo.fs",Nil,Nil), - Tree("bar.fs", Nil, - Tree("qux.fs", Nil,Nil)))) + Tree("Folder", + Tree("foo.fs",Nil,Nil), + Tree("bar.fs", Nil, + Tree("qux.fs", Nil,Nil) + ) + ) + ) TheTests.AssertSameTree(expect, project.FirstChild) SaveProject(project) let fsprojFileText = File.ReadAllText(fileName) @@ -163,10 +178,10 @@ type Project() = project.AddLinkedItem(folder, [| f |], Array.create 1 (new VSADDRESULT())) |> ValidateOK ) let expect = Tree("References", ANYTREE, - Tree("bar.fs", Nil, - Tree("Folder", - Tree("foo.fs", Nil, - Tree("qux.fs", Nil,Nil)), Nil))) + Tree("bar.fs", Nil, + Tree("Folder", + Tree("foo.fs", Nil, + Tree("qux.fs", Nil,Nil)), Nil))) TheTests.AssertSameTree(expect, project.FirstChild) SaveProject(project) let fsprojFileText = File.ReadAllText(fileName) @@ -187,10 +202,10 @@ type Project() = ) ) let expect = Tree("References", ANYTREE, - Tree("Folder", - Tree("foo.fs",Nil,Nil), - Tree("bar.fs", Nil, - Tree("qux.resx", Nil,Nil)))) + Tree("Folder", + Tree("foo.fs",Nil,Nil), + Tree("bar.fs", Nil, + Tree("qux.resx", Nil,Nil)))) TheTests.AssertSameTree(expect, project.FirstChild) SaveProject(project) let fsprojFileText = File.ReadAllText(fileName) @@ -282,12 +297,7 @@ type Project() = member private this.SampleEmptyFolderEntity = ([FolderItem @"MyFolder\"], fun t -> Tree("MyFolder", Nil, t)) member private this.SampleFolderWithItemsEntity = ([CompileItem @"MyFolder\x1.fs"; CompileItem @"MyFolder\Sub\x2.fs"; CompileItem @"MyFolder\x3.fs"], - fun t -> Tree("MyFolder", - Tree("x1.fs", Nil, - Tree("Sub", - Tree("x2.fs", Nil, Nil), - Tree("x3.fs", Nil, Nil))), - t)) + fun t -> Tree("MyFolder",Tree("x1.fs", Nil, Tree("Sub", Tree("x2.fs", Nil, Nil), Tree("x3.fs", Nil, Nil))), t)) [] member public this.``SpecificVersion.OptionsSavedToFsprojFile``() = @@ -441,14 +451,14 @@ type Project() = this.MakeProjectAndDoWithProjectFile([], [], items.ToString(), (fun project fileName -> // ensure things look right at start let expect = Tree("References", ANYTREE, - otherTreeMaker( - Tree("A", - Tree("foo.fs", Nil, - Tree("B", - Tree("qux.fs", Nil, Nil), - Tree("Empty", Nil, - Tree("zot.fs", Nil, Nil)))), - Tree("after.fs", Nil, Nil)))) + otherTreeMaker( + Tree("A", + Tree("foo.fs", Nil, + Tree("B", + Tree("qux.fs", Nil, Nil), + Tree("Empty", Nil, + Tree("zot.fs", Nil, Nil)))), + Tree("after.fs", Nil, Nil)))) TheTests.AssertSameTree(expect, project.FirstChild) let foo = TheTests.FindNodeWithCaption(project, "A") TheTests.EnsureMoveUpEnabled(foo) @@ -456,14 +466,14 @@ type Project() = TheTests.MoveUp(foo) // test that it moved up in solution explorer let expect = Tree("References", ANYTREE, - Tree("A", - Tree("foo.fs", Nil, - Tree("B", - Tree("qux.fs", Nil, Nil), - Tree("Empty", Nil, - Tree("zot.fs", Nil, Nil)))), - otherTreeMaker( - Tree("after.fs", Nil, Nil)))) + Tree("A", + Tree("foo.fs", Nil, + Tree("B", + Tree("qux.fs", Nil, Nil), + Tree("Empty", Nil, + Tree("zot.fs", Nil, Nil)))), + otherTreeMaker( + Tree("after.fs", Nil, Nil)))) TheTests.AssertSameTree(expect, project.FirstChild) // test that it moved up in MSBuild SaveProject(project) @@ -494,14 +504,14 @@ type Project() = this.MakeProjectAndDoWithProjectFile([], [], items.ToString(), (fun project fileName -> // ensure things look right at start let expect = Tree("References", ANYTREE, - Tree("A", - Tree("foo.fs", Nil, - Tree("B", - Tree("qux.fs", Nil, Nil), - Tree("Empty", Nil, - Tree("zot.fs", Nil, Nil)))), - otherTreeMaker( - Tree("after.fs", Nil, Nil)))) + Tree("A", + Tree("foo.fs", Nil, + Tree("B", + Tree("qux.fs", Nil, Nil), + Tree("Empty", Nil, + Tree("zot.fs", Nil, Nil)))), + otherTreeMaker( + Tree("after.fs", Nil, Nil)))) TheTests.AssertSameTree(expect, project.FirstChild) let foo = TheTests.FindNodeWithCaption(project, "A") TheTests.EnsureMoveDownEnabled(foo) @@ -509,14 +519,14 @@ type Project() = TheTests.MoveDown(foo) // test that it moved down in solution explorer let expect = Tree("References", ANYTREE, - otherTreeMaker( - Tree("A", - Tree("foo.fs", Nil, - Tree("B", - Tree("qux.fs", Nil, Nil), - Tree("Empty", Nil, - Tree("zot.fs", Nil, Nil)))), - Tree("after.fs", Nil, Nil)))) + otherTreeMaker( + Tree("A", + Tree("foo.fs", Nil, + Tree("B", + Tree("qux.fs", Nil, Nil), + Tree("Empty", Nil, + Tree("zot.fs", Nil, Nil)))), + Tree("after.fs", Nil, Nil)))) TheTests.AssertSameTree(expect, project.FirstChild) // test that it moved down in MSBuild SaveProject(project) @@ -735,11 +745,10 @@ type Project() = // ensure right in solution explorer let expect = Tree("References", ANYTREE, - Tree("file1.fs", Nil, - Tree("Folder1", - Tree("file2.fs", Nil, - Tree("renamedNested2.fs", Nil, Nil)), - Nil))) + Tree("file1.fs", Nil, + Tree("Folder1", + Tree("file2.fs", Nil, + Tree("renamedNested2.fs", Nil, Nil)), Nil))) TheTests.AssertSameTree (expect, project.FirstChild) finally