提交 d36d2673 编写于 作者: D Don Syme

Integrate FCS API: Other changes to vsintegration\src

上级 6c47d215

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.22512.0
VisualStudioVersion = 14.0.24720.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EnableOpenSource", "deployment\EnableOpenSource\EnableOpenSource.csproj", "{4D7BE558-E6BF-44DA-8CE2-46AA6E0DC2E7}"
EndProject
......@@ -27,7 +27,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WDExpressDeployTemplates",
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler", "..\..\src\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj", "{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSHarp.VS.FSI", "vs\FsPkgs\FSharp.VS.FSI\FSHarp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}"
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSHarp.VS.FSI", "vs\FsPkgs\FSharp.VS.FSI\FSharp.VS.FSI.fsproj", "{991DCF75-C2EB-42B6-9A0D-AA1D2409D519}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharp.Compiler.Server.Shared", "..\..\src\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj", "{D5870CF0-ED51-4CBC-B3D7-6F56DA84AC06}"
EndProject
......
......@@ -15,7 +15,7 @@
</Dependencies>
<Assets>
<Asset Type="Microsoft.VisualStudio.VsPackage" d:Source="File" Path="EnableOpenSource.pkgdef" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="FSHarp.VS.FSI" Path="|FSHarp.VS.FSI|" AssemblyName="|FSHarp.VS.FSI;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="FSharp.VS.FSI" Path="|FSharp.VS.FSI|" AssemblyName="|FSHarp.VS.FSI;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="FSharp.Compiler" Path="|FSharp.Compiler|" AssemblyName="|FSharp.Compiler;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="FSharp.Compiler.Server.Shared" Path="|FSharp.Compiler.Server.Shared|" AssemblyName="|FSharp.Compiler.Server.Shared;AssemblyName|" />
<Asset Type="Microsoft.VisualStudio.Assembly" d:Source="Project" d:ProjectName="FSharp.Core" Path="|FSharp.Core|" AssemblyName="|FSharp.Core|" />
......
......@@ -151,18 +151,18 @@ type internal Helper =
type internal GlobalParseAndTypeCheckCounter private(initialParseCount:int, initialTypeCheckCount:int, initialEventNum:int, vs) =
static member StartNew(vs) =
TakeCoffeeBreak(vs)
let n = IncrementalFSharpBuild.GetCurrentIncrementalBuildEventNum()
new GlobalParseAndTypeCheckCounter(InteractiveChecker.GlobalForegroundParseCountStatistic, InteractiveChecker.GlobalForegroundTypeCheckCountStatistic, n, vs)
let n = IncrementalBuilderEventTesting.GetCurrentIncrementalBuildEventNum()
new GlobalParseAndTypeCheckCounter(FSharpChecker.GlobalForegroundParseCountStatistic, FSharpChecker.GlobalForegroundTypeCheckCountStatistic, n, vs)
member private this.GetEvents() =
TakeCoffeeBreak(vs)
let n = IncrementalFSharpBuild.GetCurrentIncrementalBuildEventNum()
IncrementalFSharpBuild.GetMostRecentIncrementalBuildEvents(n-initialEventNum)
member private this.SawIBDeleted() =
this.GetEvents() |> List.exists (function | IncrementalFSharpBuild.IBEDeleted -> true | _ -> false)
let n = IncrementalBuilderEventTesting.GetCurrentIncrementalBuildEventNum()
IncrementalBuilderEventTesting.GetMostRecentIncrementalBuildEvents(n-initialEventNum)
member private this.SawIBCreated() =
this.GetEvents() |> List.exists (function | IncrementalBuilderEventTesting.IBECreated -> true | _ -> false)
member private this.GetParsedFilesSet() =
this.GetEvents() |> List.choose (function | IncrementalFSharpBuild.IBEParsed(file) -> Some(file) | _ -> None) |> set
this.GetEvents() |> List.choose (function | IncrementalBuilderEventTesting.IBEParsed(file) -> Some(file) | _ -> None) |> set
member private this.GetTypeCheckedFilesSet() =
this.GetEvents() |> List.choose (function | IncrementalFSharpBuild.IBETypechecked(file) -> Some(file) | _ -> None) |> set
this.GetEvents() |> List.choose (function | IncrementalBuilderEventTesting.IBETypechecked(file) -> Some(file) | _ -> None) |> set
member this.AssertExactly(expectedParses, expectedTypeChecks) =
let actualParses = this.GetParsedFilesSet().Count
let actualTypeChecks = this.GetTypeCheckedFilesSet().Count
......@@ -176,19 +176,19 @@ type internal GlobalParseAndTypeCheckCounter private(initialParseCount:int, init
false)
member this.AssertExactly((aap,expectedParsedFiles) : string option * list<OpenFile>, (aat,expectedTypeCheckedFiles) : string option * list<OpenFile>) =
this.AssertExactly((aap,expectedParsedFiles), (aat,expectedTypeCheckedFiles), false)
member this.AssertExactly((aap,expectedParsedFiles) : string option * list<OpenFile>, (aat,expectedTypeCheckedFiles) : string option * list<OpenFile>, expectDelete : bool) =
member this.AssertExactly((aap,expectedParsedFiles) : string option * list<OpenFile>, (aat,expectedTypeCheckedFiles) : string option * list<OpenFile>, expectCreate : bool) =
let p = match aap with
| Some(aap) -> aap :: (expectedParsedFiles |> List.map GetNameOfOpenFile)
| _ -> (expectedParsedFiles |> List.map GetNameOfOpenFile)
let t = match aat with
| Some(aat) -> aat :: (expectedTypeCheckedFiles |> List.map GetNameOfOpenFile)
| _ -> (expectedTypeCheckedFiles |> List.map GetNameOfOpenFile)
this.AssertExactly(p.Length, t.Length, p, t, expectDelete)
member private this.AssertExactly(expectedParses, expectedTypeChecks, expectedParsedFiles : list<string>, expectedTypeCheckedFiles : list<string>, expectDelete : bool) =
let note,ok = if expectDelete then
if this.SawIBDeleted() then ("The incremental builder was deleted, as expected",true) else ("The incremental builder was NOT deleted, even though we expected it to be",false)
this.AssertExactly(p.Length, t.Length, p, t, expectCreate)
member private this.AssertExactly(expectedParses, expectedTypeChecks, expectedParsedFiles : list<string>, expectedTypeCheckedFiles : list<string>, expectCreate : bool) =
let note,ok = if expectCreate then
if this.SawIBCreated() then ("The incremental builder was created, as expected",true) else ("The incremental builder was NOT deleted and recreated, even though we expected it to be",false)
else
if this.SawIBDeleted() then ("The incremental builder was UNEXPECTEDLY deleted",false) else ("",true)
if this.SawIBCreated() then ("The incremental builder was UNEXPECTEDLY deleted",false) else ("",true)
let actualParsedFiles = this.GetParsedFilesSet()
let actualTypeCheckedFiles = this.GetTypeCheckedFilesSet()
let actualParses = actualParsedFiles.Count
......@@ -242,7 +242,7 @@ type LanguageServiceBaseTests() =
let mutable defaultVS : VisualStudio = Unchecked.defaultof<_>
let mutable currentVS : VisualStudio = Unchecked.defaultof<_>
(* VsOps is internal, but this type needs to be public *)
let mutable ops : VsOps = fst (Models.MSBuild())
let mutable ops = BuiltMSBuildTestFlavour()
let testStopwatch = new Stopwatch()
(* Timings ----------------------------------------------------------------------------- *)
......
......@@ -250,6 +250,10 @@ module Spawn =
printfn "%s" line
eprintfn "tf submit returned error code %d" errorCode
[<AutoOpen>]
module Helpers =
type DummyType = A | B
let PathRelativeToTestAssembly p = Path.Combine(Path.GetDirectoryName(Uri(typeof<DummyType>.Assembly.CodeBase).LocalPath), p)
namespace TestLibrary
module LambdaCalculus =
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
namespace Tests
open NUnit.Framework
open System
open System.IO
......@@ -8,11 +8,10 @@ open System.Diagnostics
open UnitTests.TestLib.Utils
open Microsoft.BuildSettings
[<TestFixture>]
type Script() =
#if OPEN_BUILD
class end
#else
[<TestFixture>]
type Script() =
let replaceIfNotNull (search:string) (replace:string) (s:string) =
match s with
| null -> s
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
namespace Tests
open NUnit.Framework
open System
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.InternalCollections
namespace Tests.Compiler.InternalCollections
open System
open System.IO
......@@ -22,9 +22,10 @@ type MruCache =
member private rb.NumToStringBox n = box (rb.NumToString n)
#if DISABLED_OLD_UNITTESTS
[<Test>]
member public rb.Basic() =
let m = new MruCache<int,string>(3, rb.NumToString, (fun (x,y) -> x = y))
let m = new MruCache<int,string>(3, (fun (x,y) -> x = y))
let s = m.Get(5)
Assert.IsTrue("Five"=s)
let s = m.Get(6)
......@@ -110,6 +111,7 @@ type MruCache =
let s = m.Get (("w",6)) // forces discard of y
printfn "discarded = %A" discarded.Value
Assert.IsTrue(discarded.Value = ["y";"x";"Apple";"Banana"], "Check6")
#endif
[<TestFixture>]
type AgedLookup() =
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.Colorizer
open System
open NUnit.Framework
......@@ -9,8 +9,11 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type ColorizerTests() =
// context msbuild
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
//Marker At The End Helper Functions
......@@ -1081,25 +1084,9 @@ let z = __LINE__(*Test3*)
MoveCursorToEndOfMarker(file,"(*Bob*)typ")
AssertEqual(TokenType.Keyword,GetTokenTypeAtCursor(file))
// Allow languageService tests to run under different contextes
namespace UnitTests.Tests.LanguageService.Colorizer
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit ColorizerTests
new() = { inherit ColorizerTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit ColorizerTests
new() = { inherit ColorizerTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
\ No newline at end of file
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.AutoCompletion
open System
open Salsa.Salsa
open Salsa.VsMocks
open Salsa.VsOpsUtils
open NUnit.Framework
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open Salsa.Salsa
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
[<AutoOpen>]
module StandardSettings =
......@@ -24,7 +24,8 @@ module StandardSettings =
let AC x y = AutoCompleteExpected(x,y)
let DC x y = DotCompleteExpected(x,y)
type AutoCompletionListTests() as this =
[<TestFixture>]
type UsingMSBuild() as this =
inherit LanguageServiceBaseTests()
let createFile (code : list<string>) fileKind refs =
......@@ -230,6 +231,28 @@ type AutoCompletionListTests() as this =
let completions = time1 AutoCompleteAtCursor file "Time of first autocomplete."
AssertCompListIsEmpty(completions)
/////Helper Functios
//DotCompList ContainAll At End Of Marker Helper Function
member private this.VerifyDotCompListContainAllAtEndOfMarker(fileContents : string, marker : string, list : string list) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents)
let completions = DotCompletionAtEndOfMarker file marker
AssertCompListContainsAll(completions, list)
//DoesNotContainAny At Start Of Marker Helper Function
member private this.VerifyDotCompListDoesNotContainAnyAtStartOfMarker(fileContents : string, marker : string, list : string list, ?addtlRefAssy : list<string>) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents, ?references = addtlRefAssy)
let completions = DotCompletionAtStartOfMarker file marker
AssertCompListDoesNotContainAny(completions, list)
//DotCompList Is Empty At Start Of Marker Helper Function
member private this.VerifyDotCompListIsEmptyAtStartOfMarker(fileContents : string, marker : string, ?addtlRefAssy : list<string>) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents, ?references = addtlRefAssy)
let completions = DotCompletionAtStartOfMarker file marker
AssertCompListIsEmpty(completions)
[<Test>]
member this.``AutoCompletion.ObjectMethods``() =
let code =
......@@ -312,7 +335,7 @@ type AutoCompletionListTests() as this =
[<Test>]
[<Category("TypeProvider")>]
member this.``TypeProvider.VisibilityChecksForGeneratedTypes``() =
let extraRefs = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
let extraRefs = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
let check = DoWithAutoCompleteUsingExtraRefs extraRefs true SourceFileKind.FS Microsoft.VisualStudio.FSharp.LanguageService.BackgroundRequestReason.MemberSelect
let code =
......@@ -2102,7 +2125,7 @@ let x = new MyClass2(0)
t.I"""],
marker = "t.I",
expected = "IM1",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -2115,7 +2138,7 @@ let x = new MyClass2(0)
t.Eve"""],
marker = "t.Eve",
expected = "Event1",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -2127,7 +2150,7 @@ let x = new MyClass2(0)
type boo = N1.T<in"""],
marker = "T<in",
expected = "int",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
// In this bug, pressing dot after this was producing an invalid member list.
......@@ -4176,6 +4199,8 @@ let x = query { for bbbb in abbbbc(*D0*) do
MoveCursorToEndOfMarker(file2,"x.")
AutoCompleteAtCursor file2 |> ignore
TakeCoffeeBreak(this.VS)
// Start the key instrumentation
let gpatcc = GlobalParseAndTypeCheckCounter.StartNew(this.VS)
......@@ -5158,38 +5183,6 @@ let x = query { for bbbb in abbbbc(*D0*) do
marker = "gro",
contained = [ "groupBy"; "groupJoin"; "groupValBy";])
//****************************************//
type DotCompletionListTests() =
inherit LanguageServiceBaseTests()
/////Helper Functios
//DotCompList ContainAll At End Of Marker Helper Function
member private this.VerifyDotCompListContainAllAtEndOfMarker(fileContents : string, marker : string, list : string list) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents)
let completions = DotCompletionAtEndOfMarker file marker
AssertCompListContainsAll(completions, list)
//DotCompList ContainAll methods and properties At Start Of Marker Helper Function
member private this.VerifyDotCompListContainAllAtStartOfMarker(fileContents : string, marker : string, list :string list, ?addtlRefAssy : list<string>, ?coffeeBreak:bool) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents, ?references = addtlRefAssy)
if defaultArg coffeeBreak false then TakeCoffeeBreak(this.VS)
let completions = DotCompletionAtStartOfMarker file marker
AssertCompListContainsAll(completions, list)
//DoesNotContainAny At Start Of Marker Helper Function
member private this.VerifyDotCompListDoesNotContainAnyAtStartOfMarker(fileContents : string, marker : string, list : string list, ?addtlRefAssy : list<string>) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents, ?references = addtlRefAssy)
let completions = DotCompletionAtStartOfMarker file marker
AssertCompListDoesNotContainAny(completions, list)
//DotCompList Is Empty At Start Of Marker Helper Function
member private this.VerifyDotCompListIsEmptyAtStartOfMarker(fileContents : string, marker : string, ?addtlRefAssy : list<string>) =
let (solution, project, file) = this.CreateSingleFileProject(fileContents, ?references = addtlRefAssy)
let completions = DotCompletionAtStartOfMarker file marker
AssertCompListIsEmpty(completions)
[<Test>]
member this.``Namespace.System``() =
this.VerifyDotCompListContainAllAtEndOfMarker(
......@@ -5386,7 +5379,7 @@ type DotCompletionListTests() =
t(*Marker*)""",
marker = "(*Marker*)",
list = ["Equals";"GetHashCode"],
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -5399,7 +5392,7 @@ type DotCompletionListTests() =
t(*Marker*)""",
marker = "(*Marker*)",
list = ["Event1"],
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -5412,7 +5405,7 @@ type DotCompletionListTests() =
t(*Marker*)""",
marker = "(*Marker*)",
list = ["IM1"],
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -5424,7 +5417,7 @@ type DotCompletionListTests() =
type XXX = N1.T1(*Marker*)""",
marker = "(*Marker*)",
list = ["SomeNestedType"],
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
// should _not_ have it here
this.VerifyDotCompListDoesNotContainAnyAtStartOfMarker(
fileContents = """
......@@ -5432,7 +5425,7 @@ type DotCompletionListTests() =
t(*Marker*)""",
marker = "(*Marker*)",
list = ["SomeNestedType"],
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -5445,7 +5438,7 @@ type DotCompletionListTests() =
t.Event1(*Marker*)""",
marker = "(*Marker*)",
list = ["AddHandler";"RemoveHandler"],
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -5457,7 +5450,7 @@ type DotCompletionListTests() =
fileContents = """
let t = N.T.M(*Marker*)()""",
marker = "(*Marker*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -5471,7 +5464,7 @@ type DotCompletionListTests() =
let t = N.T.StaticProp(*Marker*)""",
marker = "(*Marker*)",
list = ["GetType"; "Equals"], // just a couple of System.Object methods: we expect them to be there!
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EditorHideMethodsAttribute.dll")])
[<Test>]
member this.CompListInDiffFileTypes() =
......@@ -7710,41 +7703,11 @@ let rec f l =
this.VerifyDotCompListContainAllAtStartOfMarker(fileContents, "(*Marker*)",
["Chars";"Length"], queryAssemblyRefs )
// Allow the CompletionListTests run under different context
namespace UnitTests.Tests.LanguageService.CompletionList
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``AutoCompletionMSBuild`` =
inherit AutoCompletionListTests
new() = { inherit AutoCompletionListTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``AutoCompletionProjectSystem`` =
inherit AutoCompletionListTests
new() = { inherit AutoCompletionListTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``DotCompletionMSBuild`` =
inherit DotCompletionListTests
new() = { inherit DotCompletionListTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``DotCompletionProjectSystem`` =
inherit DotCompletionListTests
new() = { inherit DotCompletionListTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.ErrorList
open System
open System.IO
......@@ -10,8 +10,10 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type ErrorListTests() as this =
[<TestFixture>]
type UsingMSBuild() as this =
inherit LanguageServiceBaseTests()
let VerifyErrorListContainedExpectedStr(expectedStr:string,project : OpenProject) =
......@@ -371,7 +373,7 @@ type staticInInterface =
[<Category("TypeProvider")>]
[<Category("TypeProvider.MultipleErrors")>]
member public this.``TypeProvider.MultipleErrors`` () =
let tpRef = System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")
let tpRef = PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")
let checkList n =
printfn "===TypeProvider.MultipleErrors: %d===" n
let content = sprintf "type Err = TPErrors.TP<%d>" n
......@@ -443,7 +445,7 @@ type staticInInterface =
but here has type
int """
this.VerifyErrorListContainedExpectedString(fileContent,expectedStr,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -457,7 +459,7 @@ but here has type
let expectedStr = "An error occurred applying the static arguments to a provided type"
this.VerifyErrorListContainedExpectedString(fileContent,expectedStr,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -471,7 +473,7 @@ but here has type
let expectedStr = "The static parameter 'ParamIgnored' of the provided type or method 'T' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. 'T<ParamIgnored=...>'."
this.VerifyErrorListContainedExpectedString(fileContent,expectedStr,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
member public this.``TypeProvider.ProhibitedMethods`` () =
......@@ -486,7 +488,7 @@ but here has type
(
code,
sprintf "Array method '%s' is supplied by the runtime and cannot be directly used in code." str,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
)
[<Test>]
......@@ -511,7 +513,7 @@ but here has type
type foo = N1.T<
const "Hello World",2>""",
expectedNum = 1,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -522,7 +524,7 @@ but here has type
this.VerifyNoErrorListAtOpenProject(
fileContents = """
type foo = N1.T< const "Hello World",2>""",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
......@@ -917,24 +919,7 @@ but here has type
let warnList = GetErrors(project)
Assert.AreEqual(1,warnList.Length)
//Allow the ErrorListTests run under different context
namespace UnitTests.Tests.LanguageService.ErrorList
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit ErrorListTests
new() = { inherit ErrorListTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit ErrorListTests
new() = { inherit ErrorListTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.ErrorRecovery
open System
open System.IO
......@@ -10,8 +10,10 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type ErrorRecoveryTests() =
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
//Verify the error list containd the expected string
......@@ -263,24 +265,8 @@ type ErrorRecoveryTests() =
]
)
//Allow the TimeStampTests run under different context
namespace UnitTests.Tests.LanguageService.ErrorRecovery
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit ErrorRecoveryTests
new() = { inherit ErrorRecoveryTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit ErrorRecoveryTests
new() = { inherit ErrorRecoveryTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
\ No newline at end of file
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.F1Keyword
open System
open NUnit.Framework
......@@ -9,8 +9,10 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type F1KeywordTests() =
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
member private this.TestF1Keywords(expectedKeywords, testLines, ?addtlRefAssy : list<string>) =
......@@ -204,7 +206,7 @@ type F1KeywordTests() =
Some "N1"
]
this.TestF1Keywords(keywords, file,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -222,7 +224,7 @@ type F1KeywordTests() =
Some "N1.T"
]
this.TestF1Keywords(keywords, file,
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
......@@ -369,24 +371,8 @@ type F1KeywordTests() =
]
this.TestF1Keywords(keywords, file)
// Allow the F1KeywordTests run under different context
namespace UnitTests.Tests.LanguageService.F1Keyword
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit F1KeywordTests
new() = { inherit F1KeywordTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit F1KeywordTests
new() = { inherit F1KeywordTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
\ No newline at end of file
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.General
open NUnit.Framework
open System
open System.IO
open System.Reflection
open System.Runtime.InteropServices
open Microsoft.VisualStudio.FSharp.LanguageService
open Microsoft.FSharp.Compiler
open Microsoft.FSharp.Compiler.SourceCodeServices
open Microsoft.VisualStudio.FSharp.LanguageService
open Salsa.Salsa
open Salsa
open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
[<TestFixture>]
type IdealSource() =
module IFSharpSource =
[<Test>]
member public rb.MultipleSourceIsDirtyCallsChangeTimestamps() =
let MultipleSourceIsDirtyCallsChangeTimestamps() =
let recolorizeWholeFile() = ()
let recolorizeLine (_line:int) = ()
let isClosed() = false
let source =Source.CreateDelegatingSource(recolorizeWholeFile, recolorizeLine, "dummy.fs", isClosed, VsMocks.VsFileChangeEx())
let depFileChangeNotify =
{ new IDependencyFileChangeNotify with
member this.DependencyFileCreated _projectSite = ()
member this.DependencyFileChanged _filename = () }
let source = Source.CreateSourceTestable(recolorizeWholeFile, recolorizeLine, (fun () -> "dummy.fs"), isClosed, VsMocks.VsFileChangeEx(),depFileChangeNotify)
let originalChangeCount = source.ChangeCount
let originalDirtyTime = source.DirtyTime
......@@ -43,16 +55,8 @@ type IdealSource() =
open System
open System.IO
open NUnit.Framework
open Salsa.Salsa
open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open Microsoft.FSharp.Compiler
open UnitTests.TestLib.LanguageService
type GeneralTests() =
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
let stopWatch = new System.Diagnostics.Stopwatch()
......@@ -123,28 +127,28 @@ type GeneralTests() =
// n-Ui1 + n-Ui2 = n-Ui2
requests.Enqueue(makeRequest BackgroundRequestReason.FullTypeCheck)
requests.Enqueue(makeRequest BackgroundRequestReason.UntypedParse)
verify BackgroundRequestReason.UntypedParse
requests.Enqueue(makeRequest BackgroundRequestReason.ParseFile)
verify BackgroundRequestReason.ParseFile
Assert.AreEqual(0, requests.Count)
// Ui1 + n-Ui2 = Ui1 + n-Ui2
requests.Enqueue(makeRequest BackgroundRequestReason.MemberSelect)
requests.Enqueue(makeRequest BackgroundRequestReason.UntypedParse)
requests.Enqueue(makeRequest BackgroundRequestReason.ParseFile)
verify BackgroundRequestReason.MemberSelect
Assert.AreEqual(1, requests.Count)
verify BackgroundRequestReason.UntypedParse
verify BackgroundRequestReason.ParseFile
Assert.AreEqual(0, requests.Count)
// (Ui1 + n-Ui2) + Ui3 = Ui3
requests.Enqueue(makeRequest BackgroundRequestReason.MemberSelect)
requests.Enqueue(makeRequest BackgroundRequestReason.UntypedParse)
requests.Enqueue(makeRequest BackgroundRequestReason.ParseFile)
requests.Enqueue(makeRequest BackgroundRequestReason.MemberSelect)
verify BackgroundRequestReason.MemberSelect
Assert.AreEqual(0, requests.Count)
// (Ui1 + n-Ui2) + n-Ui3 = Ui1 + n-Ui3
requests.Enqueue(makeRequest BackgroundRequestReason.MemberSelect)
requests.Enqueue(makeRequest BackgroundRequestReason.UntypedParse)
requests.Enqueue(makeRequest BackgroundRequestReason.ParseFile)
requests.Enqueue(makeRequest BackgroundRequestReason.FullTypeCheck)
verify BackgroundRequestReason.MemberSelect
Assert.AreEqual(1, requests.Count)
......@@ -260,7 +264,7 @@ EdmxFile
ResolutionFolder:String
"""
File.WriteAllText(Path.Combine(curDir, "tmp.fsx"), script)
let psi = System.Diagnostics.ProcessStartInfo("fsi.exe", "-r:FSharp.Data.TypeProviders.dll tmp.fsx")
let psi = System.Diagnostics.ProcessStartInfo(Path.Combine(curDir, "fsi.exe"), "-r:FSharp.Data.TypeProviders.dll tmp.fsx")
psi.WorkingDirectory <- curDir
psi.RedirectStandardOutput <- true
psi.UseShellExecute <- false
......@@ -302,7 +306,7 @@ EdmxFile
let filename = "test.fs"
let defines = [ "COMPILED"; "EDITING" ]
SourceTokenizer(defines,filename).CreateLineTokenizer(source))
FSharpSourceTokenizer(defines,filename).CreateLineTokenizer(source))
let cm = Microsoft.VisualStudio.FSharp.LanguageService.TokenColor.Comment
let kw = Microsoft.VisualStudio.FSharp.LanguageService.TokenColor.Keyword
......@@ -498,16 +502,16 @@ EdmxFile
member public this.``TokenInfo.TriggerClasses``() =
let important =
[ // Member select for dot completions
Parser.DOT, (TokenColorKind.Operator,TokenCharKind.Delimiter,TriggerClass.MemberSelect)
Parser.DOT, (FSharpTokenColorKind.Operator,FSharpTokenCharKind.Delimiter,FSharpTokenTriggerClass.MemberSelect)
// for parameter info
Parser.LPAREN, (TokenColorKind.Text,TokenCharKind.Delimiter, TriggerClass.ParamStart ||| TriggerClass.MatchBraces)
Parser.COMMA, (TokenColorKind.Text,TokenCharKind.Delimiter, TriggerClass.ParamNext)
Parser.RPAREN, (TokenColorKind.Text,TokenCharKind.Delimiter, TriggerClass.ParamEnd ||| TriggerClass.MatchBraces) ]
Parser.LPAREN, (FSharpTokenColorKind.Text,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamStart ||| FSharpTokenTriggerClass.MatchBraces)
Parser.COMMA, (FSharpTokenColorKind.Text,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamNext)
Parser.RPAREN, (FSharpTokenColorKind.Text,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.ParamEnd ||| FSharpTokenTriggerClass.MatchBraces) ]
let matching =
[ // Other cases where we expect MatchBraces
Parser.LQUOTE("", false); Parser.LBRACK; Parser.LBRACE; Parser.LBRACK_BAR;
Parser.RQUOTE("", false); Parser.RBRACK; Parser.RBRACE; Parser.BAR_RBRACK ]
|> List.map (fun n -> n, (TokenColorKind.Text,TokenCharKind.Delimiter, TriggerClass.MatchBraces))
|> List.map (fun n -> n, (FSharpTokenColorKind.Text,FSharpTokenCharKind.Delimiter, FSharpTokenTriggerClass.MatchBraces))
for tok, expected in List.concat [ important; matching ] do
let info = TestExpose.TokenInfo tok
AssertEqual(expected, info)
......@@ -582,24 +586,9 @@ EdmxFile
checkBraces "['x'" "](* E_L*)" 1
checkBraces "[<" ">]" 2
//Allow the TimeStampTests run under different context
namespace UnitTests.Tests.LanguageService.General
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit GeneralTests
new() = { inherit GeneralTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit GeneralTests
new() = { inherit GeneralTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
\ No newline at end of file
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.GotoDefinition
open System
open System.IO
......@@ -12,8 +12,10 @@ open UnitTests.TestLib.Utils
open System.Collections.Generic
open System.Text.RegularExpressions
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type GotoDefinitionTests() =
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
//GoToDefinitionSuccess Helper Function
......@@ -213,7 +215,7 @@ type GotoDefinitionTests() =
// C01234567890 """,
"T(*GotoValDef*)",
"// A0(*ColumnMarker*)1234567890",
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
"(*ColumnMarker*)")
// This test case checks the type with space in between like N.``T T`` for GotoDefinition
......@@ -225,7 +227,7 @@ type GotoDefinitionTests() =
// C01234567890 """,
"T``",
"// A0(*ColumnMarker*)1234567890",
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType.dll"),
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeWithSpaceInTheType.dll"),
"(*ColumnMarker*)")
// Basic scenario on a provided Constructor
......@@ -238,7 +240,7 @@ type GotoDefinitionTests() =
// C01234567890 """,
"T(*GotoValDef*)",
"// A0(*ColumnMarker*)1234567890",
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
"(*ColumnMarker*)")
// Basic scenario on a provided Method
......@@ -250,7 +252,7 @@ type GotoDefinitionTests() =
// C01234567890 """,
"M(*GotoValDef*)",
"// A0(*ColumnMarker*)1234567890",
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
"(*ColumnMarker*)")
// Basic scenario on a provided Property
......@@ -262,7 +264,7 @@ type GotoDefinitionTests() =
// C01234567890 """,
"StaticProp(*GotoValDef*)",
"// A0(*ColumnMarker*)1234567890",
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
"(*ColumnMarker*)")
// Basic scenario on a provided Event
......@@ -275,7 +277,7 @@ type GotoDefinitionTests() =
// C01234567890 """,
"Event1(*GotoValDef*)",
"// A0(*ColumnMarker*)1234567890",
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttribute.dll"),
"(*ColumnMarker*)")
// Actually execute all the scenarios...
......@@ -331,7 +333,7 @@ type GotoDefinitionTests() =
Assert.IsFalse(result.Success)
Assert.IsTrue(result.ErrorDescription.Contains("provided type 'T'"))
),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
)
[<Test>]
......@@ -359,7 +361,7 @@ type GotoDefinitionTests() =
let expectedText = sprintf "provided member '%s'" name
Assert.IsTrue(result.ErrorDescription.Contains(expectedText))
),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
)
[<Test>]
[<Category("TypeProvider")>]
......@@ -373,7 +375,7 @@ type GotoDefinitionTests() =
// B01234567890
// C01234567890 """,
marker = "T(*GotoValDef*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -388,7 +390,7 @@ type GotoDefinitionTests() =
// B01234567890
// C01234567890 """,
marker = "T(*GotoValDef*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeLineDoesnotExist.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -402,7 +404,7 @@ type GotoDefinitionTests() =
// B01234567890
// C01234567890 """,
marker = "T(*GotoValDef*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
......@@ -418,7 +420,7 @@ type GotoDefinitionTests() =
// B01234567890
// C01234567890 """,
marker = "M(*GotoValDef*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -432,7 +434,7 @@ type GotoDefinitionTests() =
// B01234567890
// C01234567890 """,
marker = "StaticProp(*GotoValDef*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -447,7 +449,7 @@ type GotoDefinitionTests() =
// B01234567890
// C01234567890 """,
marker = "Event1(*GotoValDef*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DefinitionLocationAttributeFileDoesnotExist.dll")])
[<Test>]
member public this.``ModuleDefintion``() =
......@@ -558,12 +560,12 @@ type GotoDefinitionTests() =
[<Test>]
member this.``GotoDefinition.OverloadResolutionForProperties``() =
let lines = [ "type D() ="
" member this.Foo"
" with #1##2#get(i:int) = 1"
" member this.#1##2#Foo"
" with get(i:int) = 1"
" and set (i:int) v = ()"
""
" member this.Foo"
" with #3##4#get (s:string) = 1"
" member this.#3##4#Foo"
" with get (s:string) = 1"
" and set (s:string) v = ()"
""
"D().$1$Foo 1"
......@@ -1060,12 +1062,12 @@ type GotoDefinitionTests() =
/// let a = () in let id (x : '$a) : 'a = x
[<Test>]
member public this.``GotoDefinition.Simple.Polymorph.Leftmost`` () =
this.GotoDefinitionTestWithSimpleFile "a) (*loc-33*)" None
this.GotoDefinitionTestWithSimpleFile "a) (*loc-33*)" (Some("let id (x : 'a) (*loc-33*)", "'a"))
/// let a = () in let id (x : 'a) : '$a = x
[<Test>]
member public this.``GotoDefinition.Simple.Polymorph.NotLeftmost`` () =
this.GotoDefinitionTestWithSimpleFile "a = x (*loc-34*)" None
this.GotoDefinitionTestWithSimpleFile "a = x (*loc-34*)" (Some("let id (x : 'a) (*loc-33*)", "'a"))
/// let foo = () in let f (_ as $foo) = foo in ()
[<Test>]
......@@ -1448,24 +1450,7 @@ type GotoDefinitionTests() =
this.VerifyGoToDefnNoErrorDialogAtStartOfMarker(fileContents,"A(*Marker*)", "type A = ampere")
// Allow languageService tests to run under different contextes
namespace UnitTests.Tests.LanguageService.GotoDefinition
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit GotoDefinitionTests
new() = { inherit GotoDefinitionTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit GotoDefinitionTests
new() = { inherit GotoDefinitionTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.NavigationBar
open System
open NUnit.Framework
......@@ -9,64 +9,15 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type NavigationBarTests() =
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
(* Unit tests for collapse region & navigation bar ------------------------------------- *)
member private this.TestNavigationBar (file : string list) findDecl expectedMembers =
let (_, _, file) = this.CreateSingleFileProject(file)
// Verify that the types&modules list contains 'findDecl'
let navigation = GetNavigationContentAtCursor(file)
AssertNavigationContains(navigation.TypesAndModules, findDecl)
let idxDecl = navigation.TypesAndModules |> Array.findIndex (fun nav -> nav.Label = findDecl)
let decl = navigation.TypesAndModules.[idxDecl]
// Navigate to the definition and get the contents again
MoveCursorTo(file, decl.Span.iStartLine + 1, decl.Span.iStartIndex) // line index is in the 0-based form
let navigation = GetNavigationContentAtCursor(file)
// Ensure that the right thing is selected in the dropdown
AssertEqual(idxDecl, navigation.SelectedType)
// Ensure that member list contains expected members
AssertNavigationContainsAll(navigation.Members, expectedMembers)
// Find member declaration, go to the location & test the identifier island
for memb in expectedMembers do
let decl = navigation.Members |> Array.find (fun nav -> nav.Label = memb)
MoveCursorTo(file, decl.Span.iStartLine + 1, decl.Span.iStartIndex + 1)
match GetIdentifierAtCursor file with
| None ->
Assert.Fail("No identifier at cursor!")
| Some (id, _) ->
if not (id.Contains(memb)) then Assert.Fail(sprintf "Found '%s' which isn't substring of the expected '%s'." id memb)
member private this.TestHiddenRegions (file : list<string>) regionMarkers =
let (_, _, file) = this.CreateSingleFileProject(file)
// Find locations of the regions based on markers provided
let expectedLocations =
[ for ms, me in regionMarkers do
MoveCursorToEndOfMarker(file, ms)
let sl, sc = GetCursorLocation(file)
MoveCursorToStartOfMarker(file, me)
let el, ec = GetCursorLocation(file)
// -1 to adjust line to VS format
// -1 to adjust columns (not quite sure why..)
yield (sl-1, sc-1), (el-1, ec-1) ]
// Test whether the regions are same and that no 'update' commands are created (no regions exist prior to this call)
let toCreate, toUpdate = GetHiddenRegionCommands(file)
if (toUpdate <> Map.empty<_,_>) then
Assert.Fail("Hidden regions, first call. Didn't expect any regions to update.")
AssertEqualWithMessage(expectedLocations.Length, toCreate.Length, "Different number of regions!")
AssertRegionListContains(expectedLocations, toCreate)
(* Files for testing and tests --------------------------------------------------------- *)
static member NavigationFile1 =
let NavigationFile1 =
[ "#light"
"module Example.Module"
""
......@@ -88,38 +39,7 @@ type NavigationBarTests() =
""
" type EnumOneLine = (*5s*)| OUAaa = 0 | OUBbb = 3(*5e*)" ]
[<Test>]
member public this.``Regions.NavigationFile1``() =
this.TestHiddenRegions NavigationBarTests.NavigationFile1
[ "(*1s*)", "(*1e*)"
"(*2s*)", "(*2e*)"
"(*3s*)", "(*3e*)"
"(*4s*)", "(*4e*)"
"(*5s*)", "(*5e*)"
"SomeModule", "(*5e*)" (* entire module *) ]
[<Test>]
[<Category("PerfCheck")>]
member public this.``Record1``() =
this.TestNavigationBar NavigationBarTests.NavigationFile1 "SomeModule.Rec" ["RFirst"; "RSecond"]
[<Test>]
member public this.``Record2``() =
this.TestNavigationBar NavigationBarTests.NavigationFile1 "SomeModule.Rec2" ["R2First"; "R2Second"]
[<Test>]
member public this.``Abbreviation``() =
this.TestNavigationBar NavigationBarTests.NavigationFile1 "SomeModule.Abbrev" []
[<Test>]
member public this.``Enum``() =
this.TestNavigationBar NavigationBarTests.NavigationFile1 "SomeModule.Enum" [ "Aaa"; "Bbb" ]
[<Test>]
member public this.``Enum.OneLine``() =
this.TestNavigationBar NavigationBarTests.NavigationFile1 "SomeModule.EnumOneLine" [ "OUAaa"; "OUBbb" ]
static member NavigationFile2 =
let NavigationFile2 =
[ "#light"
"module A = "
""
......@@ -176,64 +96,131 @@ type NavigationBarTests() =
" let aa () ="
" 1(*15e*) " ]
(* Unit tests for collapse region & navigation bar ------------------------------------- *)
member private this.TestNavigationBar (file : string list) findDecl expectedMembers =
let (_, _, file) = this.CreateSingleFileProject(file)
// Verify that the types&modules list contains 'findDecl'
let navigation = GetNavigationContentAtCursor(file)
AssertNavigationContains(navigation.TypesAndModules, findDecl)
let idxDecl = navigation.TypesAndModules |> Array.findIndex (fun nav -> nav.Label = findDecl)
let decl = navigation.TypesAndModules.[idxDecl]
// Navigate to the definition and get the contents again
MoveCursorTo(file, decl.Span.iStartLine + 1, decl.Span.iStartIndex) // line index is in the 0-based form
let navigation = GetNavigationContentAtCursor(file)
// Ensure that the right thing is selected in the dropdown
AssertEqual(idxDecl, navigation.SelectedType)
// Ensure that member list contains expected members
AssertNavigationContainsAll(navigation.Members, expectedMembers)
// Find member declaration, go to the location & test the identifier island
for memb in expectedMembers do
let decl = navigation.Members |> Array.find (fun nav -> nav.Label = memb)
MoveCursorTo(file, decl.Span.iStartLine + 1, decl.Span.iStartIndex + 1)
match GetIdentifierAtCursor file with
| None ->
Assert.Fail("No identifier at cursor!")
| Some (id, _) ->
if not (id.Contains(memb)) then Assert.Fail(sprintf "Found '%s' which isn't substring of the expected '%s'." id memb)
member private this.TestHiddenRegions (file : list<string>) regionMarkers =
let (_, _, file) = this.CreateSingleFileProject(file)
// Find locations of the regions based on markers provided
let expectedLocations =
[ for ms, me in regionMarkers do
MoveCursorToEndOfMarker(file, ms)
let sl, sc = GetCursorLocation(file)
MoveCursorToStartOfMarker(file, me)
let el, ec = GetCursorLocation(file)
// -1 to adjust line to VS format
// -1 to adjust columns (not quite sure why..)
yield (sl-1, sc-1), (el-1, ec-1) ]
// Test whether the regions are same and that no 'update' commands are created (no regions exist prior to this call)
let toCreate, toUpdate = GetHiddenRegionCommands(file)
if (toUpdate <> Map.empty<_,_>) then
Assert.Fail("Hidden regions, first call. Didn't expect any regions to update.")
AssertEqualWithMessage(expectedLocations.Length, toCreate.Length, "Different number of regions!")
AssertRegionListContains(expectedLocations, toCreate)
[<Test>]
member public this.``Regions.NavigationFile1``() =
this.TestHiddenRegions NavigationFile1
[ "(*1s*)", "(*1e*)"
"(*2s*)", "(*2e*)"
"(*3s*)", "(*3e*)"
"(*4s*)", "(*4e*)"
"(*5s*)", "(*5e*)"
"SomeModule", "(*5e*)" (* entire module *) ]
[<Test>]
[<Category("PerfCheck")>]
member public this.``Record1``() =
this.TestNavigationBar NavigationFile1 "SomeModule.Rec" ["RFirst"; "RSecond"]
[<Test>]
member public this.``Record2``() =
this.TestNavigationBar NavigationFile1 "SomeModule.Rec2" ["R2First"; "R2Second"]
[<Test>]
member public this.``Abbreviation``() =
this.TestNavigationBar NavigationFile1 "SomeModule.Abbrev" []
[<Test>]
member public this.``Enum``() =
this.TestNavigationBar NavigationFile1 "SomeModule.Enum" [ "Aaa"; "Bbb" ]
[<Test>]
member public this.``Enum.OneLine``() =
this.TestNavigationBar NavigationFile1 "SomeModule.EnumOneLine" [ "OUAaa"; "OUBbb" ]
[<Test>]
member public this.``Record.WithMembers``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "A.RecWith" ["WRFirst"; "WRSecond"; "RecMember" ]
this.TestNavigationBar NavigationFile2 "A.RecWith" ["WRFirst"; "WRSecond"; "RecMember" ]
[<Test>]
member public this.``Union.WithMembers``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.Union" ["UFirst"; "USecond"; "A"]
this.TestNavigationBar NavigationFile2 "B.Union" ["UFirst"; "USecond"; "A"]
[<Test>]
member public this.``Class``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.A" ["Prop"; "Func"; "Dispose"] // perhaps IDisposable.Dispose
this.TestNavigationBar NavigationFile2 "B.A" ["Prop"; "Func"; "Dispose"] // perhaps IDisposable.Dispose
[<Test>]
member public this.``Exception``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.SomeCrash" [ ]
this.TestNavigationBar NavigationFile2 "B.SomeCrash" [ ]
[<Test>]
member public this.``Module.Alias``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.MyList" [ ]
this.TestNavigationBar NavigationFile2 "B.MyList" [ ]
[<Test>]
member public this.``NestedEnum``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.MoreNested.MyEnum" [ "One"; "Two"; "Three" ]
this.TestNavigationBar NavigationFile2 "B.MoreNested.MyEnum" [ "One"; "Two"; "Three" ]
[<Test>]
member public this.``Extension``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.AExt" [ "Extension1"; "Extension2" ]
this.TestNavigationBar NavigationFile2 "B.AExt" [ "Extension1"; "Extension2" ]
[<Test>]
member public this.``Type.EndingWithProperty.WithTypeAnnotation``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.Z" [ "Z" ]
this.TestNavigationBar NavigationFile2 "B.Z" [ "Z" ]
[<Test>]
member public this.``Module.Nested``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.FooBaz" [ "toplevel" ]
this.TestNavigationBar NavigationFile2 "B.FooBaz" [ "toplevel" ]
[<Test>]
member public this.``Module.Nested.More``() =
this.TestNavigationBar NavigationBarTests.NavigationFile2 "B.FooBaz.NestedModule" [ "nestedThing" ]
// Allow the NavigationBarTests run under different context
namespace UnitTests.Tests.LanguageService.NavigationBar
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
this.TestNavigationBar NavigationFile2 "B.FooBaz.NestedModule" [ "nestedThing" ]
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit NavigationBarTests
new() = { inherit NavigationBarTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit NavigationBarTests
new() = { inherit NavigationBarTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
\ No newline at end of file
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
namespace Tests.LanguageService
open System
open System.IO
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.Script
open System
open System.IO
......@@ -10,8 +10,10 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type ScriptTests() as this =
[<TestFixture>]
type UsingMSBuild() as this =
inherit LanguageServiceBaseTests()
let notAA l = None,l
......@@ -230,7 +232,7 @@ type ScriptTests() as this =
"open System.Transactions"
]
AssertNoErrorsOrWarnings(project)
gpatcc.AssertExactly(notAA[file],notAA[file], true (* expectDelete, because dependent DLL set changed *))
gpatcc.AssertExactly(notAA[file],notAA[file], true (* expectCreate, because dependent DLL set changed *))
// FEATURE: Adding a #load to a file will cause types from that file to be visible in intellisense
[<Test>]
......@@ -350,7 +352,7 @@ type ScriptTests() as this =
SaveFileToDisk(file)
TakeCoffeeBreak(this.VS)
VerifyErrorListContainedExpetedStr("Transactions",project)
gpatcc.AssertExactly(notAA[file], notAA[file], true (* expectDelete, because dependent DLL set changed *))
gpatcc.AssertExactly(notAA[file], notAA[file], true (* expectCreate, because dependent DLL set changed *))
......@@ -920,13 +922,13 @@ type ScriptTests() as this =
let (project, file) = createSingleFileFsxFromLines code
MoveCursorToEndOfMarker(file, "System.ConsoleModifiers.Sh")
let tooltip = GetQuickInfoAtCursor file
AssertContains(tooltip, @"[Signature:F:System.ConsoleModifiers.Shift]") // A message from the mock IdealDocumentationProvider
AssertContains(tooltip, @"[Signature:F:System.ConsoleModifiers.Shift]") // A message from the mock IDocumentationBuilder
AssertContains(tooltip, @"[Filename:")
AssertContains(tooltip, @"mscorlib.dll]") // The assembly we expect the documentation to get taken from
MoveCursorToEndOfMarker(file, "(3).ToString().Len")
let tooltip = GetQuickInfoAtCursor file
AssertContains(tooltip, @"[Signature:P:System.String.Length]") // A message from the mock IdealDocumentationProvider
AssertContains(tooltip, @"[Signature:P:System.String.Length]") // A message from the mock IDocumentationBuilder
AssertContains(tooltip, @"[Filename:")
AssertContains(tooltip, @"mscorlib.dll]") // The assembly we expect the documentation to get taken from
......@@ -1225,11 +1227,11 @@ type ScriptTests() as this =
]
let (project, file) = createSingleFileFsxFromLines code
let projectFolder = ProjectDirectory(project)
let fas = GetCheckOptionsOfScript(file)
AssertArrayContainsPartialMatchOf(fas.ProjectOptions, "--noframework")
AssertArrayContainsPartialMatchOf(fas.ProjectOptions, "System.Runtime.Remoting.dll")
AssertArrayContainsPartialMatchOf(fas.ProjectOptions, "System.Transactions.dll")
AssertArrayContainsPartialMatchOf(fas.ProjectOptions, "FSharp.Compiler.Interactive.Settings.dll")
let fas = GetProjectOptionsOfScript(file)
AssertArrayContainsPartialMatchOf(fas.OtherOptions, "--noframework")
AssertArrayContainsPartialMatchOf(fas.OtherOptions, "System.Runtime.Remoting.dll")
AssertArrayContainsPartialMatchOf(fas.OtherOptions, "System.Transactions.dll")
AssertArrayContainsPartialMatchOf(fas.OtherOptions, "FSharp.Compiler.Interactive.Settings.dll")
Assert.AreEqual(Path.Combine(projectFolder,"File1.fsx"), fas.ProjectFileNames.[0])
Assert.AreEqual(1, fas.ProjectFileNames.Length)
......@@ -1375,8 +1377,12 @@ type ScriptTests() as this =
let fsVersion =
#if VS_VERSION_DEV12
"4.3.1.0"
#else
#if VS_VERSION_DEV14
"4.4.0.0"
#else
"4.4.1.0"
#endif
#endif
PlaceIntoProjectFileBeforeImport
(project, sprintf @"
......@@ -1611,7 +1617,7 @@ type ScriptTests() as this =
]
let refs =
[
System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")
PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")
]
let (_, project, file) = this.CreateSingleFileProject(code, references = refs)
TakeCoffeeBreak(this.VS)
......@@ -1619,7 +1625,7 @@ type ScriptTests() as this =
member public this.TypeProviderDisposalSmokeTest(clearing) =
use _guard = this.UsingNewVS()
let providerAssemblyName = System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")
let providerAssemblyName = PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")
let providerAssembly = System.Reflection.Assembly.LoadFrom providerAssemblyName
Assert.IsNotNull(providerAssembly, "provider assembly should not be null")
let providerCounters = providerAssembly.GetType("DummyProviderForLanguageServiceTesting.GlobalCounters")
......@@ -1659,7 +1665,7 @@ type ScriptTests() as this =
for i in 1 .. 50 do
let solution = this.CreateSolution()
let project = CreateProject(solution,"testproject" + string (i % 20))
this.AddAssemblyReference(project, System.IO.Path.Combine(System.Environment.CurrentDirectory, @"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll"))
this.AddAssemblyReference(project, PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll"))
let fileName = sprintf "File%d.fs" i
let file1 = AddFileFromText(project,fileName, ["let x" + string i + " = N1.T1()" ])
let file = OpenFile(project,fileName)
......@@ -1706,25 +1712,9 @@ type ScriptTests() as this =
[<Category("TypeProvider")>]
member public this.``TypeProvider.Disposal.SmokeTest2``() = this.TypeProviderDisposalSmokeTest(false)
//Allow the ScriptTests run under different context
namespace UnitTests.Tests.LanguageService.Script
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit ScriptTests
new() = { inherit ScriptTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit ScriptTests
new() = { inherit ScriptTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.Squiggles
open System
open System.IO
......@@ -10,8 +10,10 @@ open Salsa.VsOpsUtils
open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
type SquiggleTests() as this=
[<TestFixture>]
type UsingMSBuild() as this=
inherit LanguageServiceBaseTests()
#if FX_ATLEAST_45
......@@ -297,7 +299,7 @@ type X() =
[<Test>]
[<Category("TypeProvider")>]
member this.``TypeProvider.Error.VerbatimStringAccident.GoodErrorMessage``() =
let r = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
let r = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")]
let (sln, proj, file) = this.CreateSingleFileProject("""type foo = N1.T<@"foo">""", references = r)
TakeCoffeeBreak(this.VS)// Wait for the background compiler to catch up.
MoveCursorToStartOfMarker(file, "1")
......@@ -313,14 +315,14 @@ type X() =
[<Test>]
[<Category("TypeProvider")>]
member public this.``TypeProvider.WarningAboutEmptyAssembly`` () =
let emptyLoc = System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\EmptyAssembly.dll")
let emptyLoc = PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\EmptyAssembly.dll")
this.VerifySquiggleAtStartOfMarker(
fileContents = "type foo = N1.T<\"foo\"",
marker = "t",
expectedSquiggle= (Microsoft.VisualStudio.FSharp.LanguageService.Severity.Warning,
"Referenced assembly '"+emptyLoc+"' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found"),
// ensure that if you referenced two TP assemblies, one of which contained TPs, and the other did not, then you get the warning about a TP assembly with no TPs
addtlRefAssy = [emptyLoc; System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")],
addtlRefAssy = [emptyLoc; PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")],
thereShouldBeNoOtherSquigglesHere=true)
[<Test>]
......@@ -332,7 +334,7 @@ type X() =
marker = "N1",
expectedSquiggle= (Microsoft.VisualStudio.FSharp.LanguageService.Severity.Error,
"The static parameter 'Param1' of the provided type or method 'T' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. 'T<Param1=...>'."),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -343,7 +345,7 @@ type X() =
marker = "N1",
expectedSquiggle= (Microsoft.VisualStudio.FSharp.LanguageService.Severity.Error,
"The static parameter 'ParamIgnored' of the provided type or method 'T' requires a value. Static parameters to type providers may be optionally specified using named arguments, e.g. 'T<ParamIgnored=...>'."),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -356,7 +358,7 @@ type X() =
marker = "let",
expectedSquiggle= (Microsoft.VisualStudio.FSharp.LanguageService.Severity.Error,
"Expected type argument or static argument"),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -369,7 +371,7 @@ type X() =
marker = "let",
expectedSquiggle= (Microsoft.VisualStudio.FSharp.LanguageService.Severity.Error,
"Incomplete structured construct at or before this point in type arguments. Expected ',', '>' or other token."),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
[<Category("TypeProvider")>]
......@@ -386,7 +388,7 @@ type X() =
" string \n"+
"but here has type\n"+
" int "),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
......@@ -399,7 +401,7 @@ type X() =
fileContents = """
type foo = N1(*Marker*).T< const "Hello World",2>""",
marker = "(*Marker*)",
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
......@@ -418,7 +420,7 @@ type X() =
"offside of context started at position (2:39). "+
"Try indenting this token further or using "+
"standard formatting conventions."),
addtlRefAssy = [System.IO.Path.Combine(System.Environment.CurrentDirectory,@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
addtlRefAssy = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
......@@ -866,25 +868,15 @@ type X() =
["#light"
"module Module2"]
// Assertion below is very subtle. Here's what happened. After opening file1, we opened file2. This changed the contents
// of the project file, and focused file2 (and unfocused file1). Since then, we have never done anything to file1, not even
// OnIdle (which salsa only does for currently-focused-file), and thus when we touch file1 again, it falls into the logic
// in servicem.fs here:
// Furthermore, if we know our project is out-of-date, this may mean that dependent DLLs may have changed on disk without us knowing,
// since we only just started listening for those changes a moment ago in the SetDependencyFiles() call. So behave just as if we were
// just notified that those dependency files changed. (In the future, it would be good to partition a source file's dependencies into
// 'project' dependencies (that only depend on the IProjectSite, e.g. project/asseembly references) and 'source' dependencies (e.g. #r's).)
//if outOfDateProjectFileNames.Contains(projectFileName) then
// this.Parser.InvalidateConfiguration(checkOptions)
// which assumes 'the worst' and calls InvalidateConfiguration (which calls InvalidateBuildCacheEntry, which deletes the IncrementalBuilder).
// I am happy to have this under test.
// The next test below (Case B) simulates behavior more like VS, which would be idling all the open files.
gpatcc.AssertExactly(AA[file1;file2], AA[file1;file2], true)
gpatcc.AssertExactly(notAA[], notAA[])
let gpatcc = GlobalParseAndTypeCheckCounter.StartNew(this.VS)
printfn "Fixing file1 on disk"
SaveFileToDisk file1
gpatcc.AssertExactly(notAA[file1],notAA[file1;file2])
let gpatcc = GlobalParseAndTypeCheckCounter.StartNew(this.VS)
SwitchToFile this.VS file2
TakeCoffeeBreak(this.VS)
MoveCursorToEndOfMarker(file2,"open Modu") // This switches focus back to file2
TakeCoffeeBreak(this.VS)
let ans = GetSquiggleAtCursor(file2)
......@@ -960,24 +952,8 @@ type X() =
| _ -> Assert.Fail("No squiggle seen")
//Allow the SquiggleTests run under different context
namespace UnitTests.Tests.LanguageService.Squiggle
open UnitTests.Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit SquiggleTests
new() = { inherit SquiggleTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit SquiggleTests
new() = { inherit SquiggleTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.LanguageService
namespace Tests.LanguageService.TimeStamp
open System
open System.IO
......@@ -11,7 +11,8 @@ open UnitTests.TestLib.Salsa
open UnitTests.TestLib.Utils
open UnitTests.TestLib.LanguageService
type TimeStampTests() =
[<TestFixture>]
type UsingMSBuild() =
inherit LanguageServiceBaseTests()
(* Timings ----------------------------------------------------------------------------- *)
......@@ -186,6 +187,7 @@ type TimeStampTests() =
// Add a new reference project2->project1. There should be no completions because Mary doesn't exist yet.
this.AddAssemblyReference(project2,project1Dll.ExecutableOutput)
TakeCoffeeBreak(this.VS) // Dependencies between projects get registered for file-watching during OnIdle processing
SwitchToFile this.VS file2
MoveCursorToEndOfMarker(file2,"File1.File1.")
let completions = AutoCompleteAtCursor(file2)
Assert.AreEqual(0, completions.Length)
......@@ -198,6 +200,7 @@ type TimeStampTests() =
SaveFileToDisk file1
time1 Build project1 "Time to build project1 second time" |> ignore
TakeCoffeeBreak(this.VS) // Give enough time to catch up
SwitchToFile this.VS file2
MoveCursorToEndOfMarker(file2,"File1.File1.")
TakeCoffeeBreak(this.VS) // Give enough time to catch up
let completions = AutoCompleteAtCursor(file2)
......@@ -238,6 +241,7 @@ type TimeStampTests() =
// Add a new reference project2->project1. There should be no completions because Mary doesn't exist yet.
this.AddAssemblyReference(project2,project1DllRelative)
TakeCoffeeBreak(this.VS) // Dependencies between projects get registered for file-watching during OnIdle processing
SwitchToFile this.VS file2
MoveCursorToEndOfMarker(file2,"File1.File1.")
let completions = AutoCompleteAtCursor(file2)
Assert.AreEqual(0, completions.Length)
......@@ -250,6 +254,7 @@ type TimeStampTests() =
SaveFileToDisk file1
time1 Build project1 "Time to build project1 second time" |> ignore
TakeCoffeeBreak(this.VS) // Give enough time to catch up
SwitchToFile this.VS file2
MoveCursorToEndOfMarker(file2,"File1.File1.")
TakeCoffeeBreak(this.VS) // Give enough time to catch up
let completions = AutoCompleteAtCursor(file2)
......@@ -290,6 +295,7 @@ type TimeStampTests() =
TakeCoffeeBreak(this.VS) // Dependencies between projects get registered for file-watching during OnIdle processing
SetConfigurationAndPlatform(project1, "Debug|AnyCPU") // maybe due to msbuild bug on dev10, we must set config/platform when building with ProjectReferences
SetConfigurationAndPlatform(project2, "Debug|AnyCPU") // maybe due to msbuild bug on dev10, we must set config/platform when building with ProjectReferences
SwitchToFile this.VS file2
MoveCursorToEndOfMarker(file2,"File1.File1.")
let completions = AutoCompleteAtCursor(file2)
Assert.AreEqual(0, completions.Length)
......@@ -302,6 +308,7 @@ type TimeStampTests() =
SaveFileToDisk file1
time1 Build project1 "Time to build project1 second time" |> ignore
TakeCoffeeBreak(this.VS) // Give enough time to catch up
SwitchToFile this.VS file2
MoveCursorToEndOfMarker(file2,"File1.File1.")
TakeCoffeeBreak(this.VS) // Give enough time to catch up
let completions = AutoCompleteAtCursor(file2)
......@@ -310,23 +317,14 @@ type TimeStampTests() =
//Allow the TimeStampTests run under different context
namespace UnitTests.Tests.LanguageService.TimeStamp
open UnitTests.Tests.LanguageService
namespace Tests.LanguageService.TimeStamp
open Tests.LanguageService
open UnitTests.TestLib.LanguageService
open UnitTests.TestLib.ProjectSystem
open NUnit.Framework
open Salsa.Salsa
// context msbuild
[<TestFixture>]
[<Category("LanguageService.MSBuild")>]
type ``MSBuild`` =
inherit TimeStampTests
new() = { inherit TimeStampTests(VsOpts = fst (Models.MSBuild())); }
// Context project system
[<TestFixture>]
[<Category("LanguageService.ProjectSystem")>]
type ``ProjectSystem`` =
inherit TimeStampTests
new() = { inherit TimeStampTests(VsOpts = LanguageServiceExtension.ProjectSystem); }
\ No newline at end of file
type UsingProjectSystem() =
inherit UsingMSBuild(VsOpts = LanguageServiceExtension.ProjectSystemTestFlavour)
\ No newline at end of file
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
// System namespaces
open System
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
// System namespaces
open System
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
open System
open System.Collections.Generic
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
// System namespaces
open System
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
open System
open System.IO
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
open System
open System.Collections.Generic
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
open System
open System.IO
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests.ProjectSystem
namespace Tests.ProjectSystem
// System namespaces
open System
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
namespace Tests.LanguageService.ErrorList
open NUnit.Framework
open System
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
namespace Tests.DataTypeProviders
open System.IO
open NUnit.Framework
......@@ -10,7 +10,7 @@ module CF = Microsoft.FSharp.Data.TypeProviders.DesignTime.ConfigFiles
module Util = Microsoft.FSharp.Data.TypeProviders.Utility.Util
[<TestFixture>]
type TypeProviderImplTests() =
type ImplDetails() =
[<Test>]
member public this.``SanitizeFileName``() =
......
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
(*
Is NUNIT just disappearing when you run one of these tests?
There are paths in the compiler that call Process.Exit, if we manage to hit one of these paths then the process (nunit-gui.exe)
will be exited:
Put a break point on:
System.Environment.Exit(n)
*)
namespace Tests.Compiler.Watson
#nowarn "52" // The value has been copied to ensure the original is not mutated
......@@ -27,12 +17,13 @@ type Check =
try
try
#if DEBUG
Microsoft.FSharp.Compiler.CompileOps.FullCompiler.showAssertForUnexpectedException := false
Microsoft.FSharp.Compiler.CompileOps.CompilerService.showAssertForUnexpectedException := false
#endif
if (File.Exists("watson-test.fs")) then
File.Delete("watson-test.fs")
File.WriteAllText("watson-test.fs", "// Hello watson" )
let _code = Microsoft.FSharp.Compiler.CommandLineMain.main([| "--simulateException:"+simulationCode; "watson-test.fs"|])
let argv = [| "--simulateException:"+simulationCode; "watson-test.fs"|]
let _code = Microsoft.FSharp.Compiler.Driver.mainCompile (argv, false, Microsoft.FSharp.Compiler.ErrorLogger.QuitProcessExiter)
()
with
| :? 'TException as e ->
......@@ -43,127 +34,127 @@ type Check =
Assert.Fail("The correct callstack was not reported to watson.")
finally
#if DEBUG
Microsoft.FSharp.Compiler.CompileOps.FullCompiler.showAssertForUnexpectedException := true
Microsoft.FSharp.Compiler.CompileOps.CompilerService.showAssertForUnexpectedException := true
#endif
File.Delete("watson-test.fs")
[<TestFixture>]
type Watson() =
module WatsonTests =
[<Test>]
member public w.FscOutOfMemory() = Check.FscLevelException<System.OutOfMemoryException>("fsc-oom")
let FscOutOfMemory() = Check.FscLevelException<System.OutOfMemoryException>("fsc-oom")
[<Test>]
member public w.FscArgumentNull() = Check.FscLevelException<System.ArgumentNullException>("fsc-an")
let FscArgumentNull() = Check.FscLevelException<System.ArgumentNullException>("fsc-an")
[<Test>]
member public w.FscInvalidOperation() = Check.FscLevelException<System.InvalidOperationException>("fsc-invop")
let FscInvalidOperation() = Check.FscLevelException<System.InvalidOperationException>("fsc-invop")
// As of .NET 4.0 some exception types cannot be caught. As a result, we cannot test this case. I did visually confirm a Watson report is sent, though.
// [<Test>]
// member public w.FscAccessViolation() = Check.FscLevelException<System.AccessViolationException>("fsc-ac")
// let FscAccessViolation() = Check.FscLevelException<System.AccessViolationException>("fsc-ac")
[<Test>]
member public w.FscArgumentOutOfRange() = Check.FscLevelException<System.ArgumentOutOfRangeException>("fsc-aor")
let FscArgumentOutOfRange() = Check.FscLevelException<System.ArgumentOutOfRangeException>("fsc-aor")
[<Test>]
member public w.FscDivideByZero() = Check.FscLevelException<System.DivideByZeroException>("fsc-dv0")
let FscDivideByZero() = Check.FscLevelException<System.DivideByZeroException>("fsc-dv0")
[<Test>]
member public w.FscNotFiniteNumber() = Check.FscLevelException<System.NotFiniteNumberException>("fsc-nfn")
let FscNotFiniteNumber() = Check.FscLevelException<System.NotFiniteNumberException>("fsc-nfn")
[<Test>]
member public w.FscOverflow() = Check.FscLevelException<System.OverflowException>("fsc-oe")
let FscOverflow() = Check.FscLevelException<System.OverflowException>("fsc-oe")
[<Test>]
member public w.FscArrayTypeMismatch() = Check.FscLevelException<System.ArrayTypeMismatchException>("fsc-atmm")
let FscArrayTypeMismatch() = Check.FscLevelException<System.ArrayTypeMismatchException>("fsc-atmm")
[<Test>]
member public w.FscBadImageFormat() = Check.FscLevelException<System.BadImageFormatException>("fsc-bif")
let FscBadImageFormat() = Check.FscLevelException<System.BadImageFormatException>("fsc-bif")
[<Test>]
member public w.FscKeyNotFound() = Check.FscLevelException<System.Collections.Generic.KeyNotFoundException>("fsc-knf")
let FscKeyNotFound() = Check.FscLevelException<System.Collections.Generic.KeyNotFoundException>("fsc-knf")
[<Test>]
member public w.FscIndexOutOfRange() = Check.FscLevelException<System.IndexOutOfRangeException>("fsc-ior")
let FscIndexOutOfRange() = Check.FscLevelException<System.IndexOutOfRangeException>("fsc-ior")
[<Test>]
member public w.FscInvalidCast() = Check.FscLevelException<System.InvalidCastException>("fsc-ic")
let FscInvalidCast() = Check.FscLevelException<System.InvalidCastException>("fsc-ic")
[<Test>]
member public w.FscInvalidProgram() = Check.FscLevelException<System.InvalidProgramException>("fsc-ip")
let FscInvalidProgram() = Check.FscLevelException<System.InvalidProgramException>("fsc-ip")
[<Test>]
member public w.FscMemberAccess() = Check.FscLevelException<System.MemberAccessException>("fsc-ma")
let FscMemberAccess() = Check.FscLevelException<System.MemberAccessException>("fsc-ma")
[<Test>]
member public w.FscNotImplemented() = Check.FscLevelException<System.NotImplementedException>("fsc-ni")
let FscNotImplemented() = Check.FscLevelException<System.NotImplementedException>("fsc-ni")
[<Test>]
member public w.FscNullReference() = Check.FscLevelException<System.NullReferenceException>("fsc-nr")
let FscNullReference() = Check.FscLevelException<System.NullReferenceException>("fsc-nr")
[<Test>]
member public w.FscOperationCancelled() = Check.FscLevelException<System.OperationCanceledException>("fsc-oc")
let FscOperationCancelled() = Check.FscLevelException<System.OperationCanceledException>("fsc-oc")
//[<Test>]
//member public w.FscFailure() = Check.FscLevelException<Microsoft.FSharp.Core.FailureException>("fsc-fail")
//let FscFailure() = Check.FscLevelException<Microsoft.FSharp.Core.FailureException>("fsc-fail")
[<Test>]
member public w.TypeCheckOutOfMemory() = Check.FscLevelException<System.OutOfMemoryException>("tc-oom")
let TypeCheckOutOfMemory() = Check.FscLevelException<System.OutOfMemoryException>("tc-oom")
[<Test>]
member public w.TypeCheckArgumentNull() = Check.FscLevelException<System.ArgumentNullException>("tc-an")
let TypeCheckArgumentNull() = Check.FscLevelException<System.ArgumentNullException>("tc-an")
[<Test>]
member public w.TypeCheckInvalidOperation() = Check.FscLevelException<System.InvalidOperationException>("tc-invop")
let TypeCheckInvalidOperation() = Check.FscLevelException<System.InvalidOperationException>("tc-invop")
// As of .NET 4.0 some exception types cannot be caught. As a result, we cannot test this case. I did visually confirm a Watson report is sent, though.
// [<Test>]
// member public w.TypeCheckAccessViolation() = Check.FscLevelException<System.AccessViolationException>("tc-ac")
// let TypeCheckAccessViolation() = Check.FscLevelException<System.AccessViolationException>("tc-ac")
[<Test>]
member public w.TypeCheckArgumentOutOfRange() = Check.FscLevelException<System.ArgumentOutOfRangeException>("tc-aor")
let TypeCheckArgumentOutOfRange() = Check.FscLevelException<System.ArgumentOutOfRangeException>("tc-aor")
[<Test>]
member public w.TypeCheckDivideByZero() = Check.FscLevelException<System.DivideByZeroException>("tc-dv0")
let TypeCheckDivideByZero() = Check.FscLevelException<System.DivideByZeroException>("tc-dv0")
[<Test>]
member public w.TypeCheckNotFiniteNumber() = Check.FscLevelException<System.NotFiniteNumberException>("tc-nfn")
let TypeCheckNotFiniteNumber() = Check.FscLevelException<System.NotFiniteNumberException>("tc-nfn")
[<Test>]
member public w.TypeCheckOverflow() = Check.FscLevelException<System.OverflowException>("tc-oe")
let TypeCheckOverflow() = Check.FscLevelException<System.OverflowException>("tc-oe")
[<Test>]
member public w.TypeCheckArrayTypeMismatch() = Check.FscLevelException<System.ArrayTypeMismatchException>("tc-atmm")
let TypeCheckArrayTypeMismatch() = Check.FscLevelException<System.ArrayTypeMismatchException>("tc-atmm")
[<Test>]
member public w.TypeCheckBadImageFormat() = Check.FscLevelException<System.BadImageFormatException>("tc-bif")
let TypeCheckBadImageFormat() = Check.FscLevelException<System.BadImageFormatException>("tc-bif")
[<Test>]
member public w.TypeCheckKeyNotFound() = Check.FscLevelException<System.Collections.Generic.KeyNotFoundException>("tc-knf")
let TypeCheckKeyNotFound() = Check.FscLevelException<System.Collections.Generic.KeyNotFoundException>("tc-knf")
[<Test>]
member public w.TypeCheckIndexOutOfRange() = Check.FscLevelException<System.IndexOutOfRangeException>("tc-ior")
let TypeCheckIndexOutOfRange() = Check.FscLevelException<System.IndexOutOfRangeException>("tc-ior")
[<Test>]
member public w.TypeCheckInvalidCast() = Check.FscLevelException<System.InvalidCastException>("tc-ic")
let TypeCheckInvalidCast() = Check.FscLevelException<System.InvalidCastException>("tc-ic")
[<Test>]
member public w.TypeCheckInvalidProgram() = Check.FscLevelException<System.InvalidProgramException>("tc-ip")
let TypeCheckInvalidProgram() = Check.FscLevelException<System.InvalidProgramException>("tc-ip")
[<Test>]
member public w.TypeCheckMemberAccess() = Check.FscLevelException<System.MemberAccessException>("tc-ma")
let TypeCheckMemberAccess() = Check.FscLevelException<System.MemberAccessException>("tc-ma")
[<Test>]
member public w.TypeCheckNotImplemented() = Check.FscLevelException<System.NotImplementedException>("tc-ni")
let TypeCheckNotImplemented() = Check.FscLevelException<System.NotImplementedException>("tc-ni")
[<Test>]
member public w.TypeCheckNullReference() = Check.FscLevelException<System.NullReferenceException>("tc-nr")
let TypeCheckNullReference() = Check.FscLevelException<System.NullReferenceException>("tc-nr")
[<Test>]
member public w.TypeCheckOperationCancelled() = Check.FscLevelException<System.OperationCanceledException>("tc-oc")
let TypeCheckOperationCancelled() = Check.FscLevelException<System.OperationCanceledException>("tc-oc")
[<Test>]
member public w.TypeCheckFailure() = Check.FscLevelException<System.Exception>("tc-fail")
let TypeCheckFailure() = Check.FscLevelException<System.Exception>("tc-fail")
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace UnitTests.Tests
namespace Tests.LanguageService
open System
open NUnit.Framework
......@@ -11,7 +11,7 @@ open UnitTests.TestLib.Utils
[<TestFixture>]
type XmlDocComments() =
inherit UnitTests.TestLib.LanguageService.LanguageServiceBaseTests(VsOpts = fst (Models.InstalledMSBuild()))
inherit UnitTests.TestLib.LanguageService.LanguageServiceBaseTests(VsOpts = InstalledMSBuildTestFlavour())
// Work around an innocuous 'feature' with how QuickInfo is displayed, lines which
// should have a "\r\n" just have a "\r"
let trimnewlines (str : string) =
......
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
......@@ -13,7 +13,6 @@
<ProjectGuid>{EE85AAB7-CDA0-4C4E-BDA0-A64DDDD13E3F}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>Unittests</AssemblyName>
<GenerateInterfaceFile>Unittests.fsi</GenerateInterfaceFile>
<TargetType>LIBRARY</TargetType>
<NoWarn>58;75</NoWarn>
<PlatformTarget>x86</PlatformTarget>
......@@ -62,8 +61,26 @@
<Compile Include="Tests.ProjectSystem.References.fs" />
<Compile Include="Tests.ProjectSystem.RoundTrip.fs" />
<Compile Include="Tests.ProjectSystem.UpToDate.fs" />
<Compile Include="..\..\..\tests\service\FsUnit.fs">
<Link>FsUnit.fs</Link>
</Compile>
<Compile Include="..\..\..\tests\service\Common.fs">
<Link>Common.fs</Link>
</Compile>
<Compile Include="..\..\..\tests\service\EditorTests.fs">
<Link>EditorTests.fs</Link>
</Compile>
<Compile Include="..\..\..\tests\service\FileSystemTests.fs">
<Link>FileSystemTests.fs</Link>
</Compile>
<Compile Include="..\..\..\tests\service\ProjectAnalysisTests.fs">
<Link>ProjectAnalysisTests.fs</Link>
</Compile>
<Compile Include="..\..\..\tests\service\MultiProjectAnalysisTests.fs">
<Link>MultiProjectAnalysisTests.fs</Link>
</Compile>
<CustomCopyLocal Include="Unittests.dll.config">
<TargetFilename>Unittests.dll.config</TargetFilename>
<TargetFilename>Unittests.dll.config</TargetFilename>
</CustomCopyLocal>
</ItemGroup>
<ItemGroup>
......@@ -105,14 +122,9 @@
<Reference Include="Microsoft.VisualStudio.CommonIDE" />
<Reference Include="Microsoft.VisualStudio.VSHelp.dll" />
<Reference Include="nunit.framework">
<Private>True</Private>
<HintPath>$(NUnitLibDir)\nunit.framework.dll</HintPath>
</Reference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\Fsc\Fsc.fsproj">
<Project>{ffde9e47-9675-4498-b540-69b2583dd600}</Project>
<Name>Fsc</Name>
<Private>True</Private>
</ProjectReference>
<HintPath>$(NUnitLibDir)\nunit.framework.dll</HintPath>
</Reference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
<Name>FSharp.Core</Name>
......@@ -122,11 +134,6 @@
<Project>{702a7979-bcf9-4c41-853e-3adfc9897890}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
<Project>{2E4D67B4-522D-4CF7-97E4-BA940F0B18F3}</Project>
<Name>FSharp.Compiler</Name>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Data.TypeProviders\FSharp.Data.TypeProviders.fsproj">
<Project>{cb7d20c4-6506-406d-9144-5342c3595f03}</Project>
<Name>FSharp.Data.TypeProviders</Name>
......
......@@ -6,7 +6,6 @@ open System
open System.ComponentModel.Composition
open Microsoft.VisualStudio
open Microsoft.VisualStudio.FSharp.LanguageService
open Microsoft.VisualStudio.FSharp.Shared
open Microsoft.VisualStudio.Editor
open Microsoft.VisualStudio.Shell
open Microsoft.VisualStudio.Shell.Interop
......
......@@ -5,7 +5,7 @@ namespace Microsoft.VisualStudio.FSharp.Editor
open System
open System.ComponentModel.Composition
open Microsoft.VisualStudio
open Microsoft.VisualStudio.FSharp.Shared
open Microsoft.VisualStudio.FSharp.LanguageService
open Microsoft.VisualStudio.Shell
open Microsoft.VisualStudio.Text
open Microsoft.VisualStudio.Text.Editor
......
......@@ -4,6 +4,7 @@ namespace Microsoft.VisualStudio.FSharp.Editor
open Microsoft.VisualStudio
open Microsoft.VisualStudio.Editor
open Microsoft.VisualStudio.TextManager.Interop
open Microsoft.VisualStudio.FSharp.LanguageService
open Microsoft.VisualStudio.Shell
open Microsoft.VisualStudio.Text.Editor
......@@ -20,7 +21,7 @@ type internal TokenContext (serviceProvider : SVsServiceProvider, adapterService
let hr,buffer = vsTextView.GetBuffer()
ErrorHandler.ThrowOnFailure(hr) |> ignore
let hr,colorizer = fsLangService.GetColorizer(buffer)
let hr,colorizer = (fsLangService :> IVsLanguageInfo).GetColorizer(buffer)
ErrorHandler.ThrowOnFailure(hr) |> ignore
let fsColorizer = colorizer :?> FSharpColorizer
......
......@@ -108,7 +108,7 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem
member ips.ErrorListTaskProvider() = inner.ErrorListTaskProvider()
member ips.ErrorListTaskReporter() = inner.ErrorListTaskReporter()
member ips.TargetFrameworkMoniker = inner.TargetFrameworkMoniker
member ips.IsTypeResolutionValid = true
member ips.IsIncompleteTypeCheckEnvironment = false
member ips.LoadTime = inner.LoadTime
......@@ -116,6 +116,7 @@ namespace Microsoft.VisualStudio.FSharp.ProjectSystem
| Opening=1 // The project has been opened, but has not yet called Compile() to compute sources/flags
| Opened=2 // The project is open, has some (possibly stale) sources/flags info
| Closed=3 // The project closed, has stale sources/flags info
type internal ProjectSiteOptionLifetime() =
let mutable state = ProjectSiteOptionLifetimeState.Opening
let mutable projectSite : DynamicProjectSite option = None
......@@ -209,7 +210,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
Height = 120,
Window="34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3")>] // where 34E76E81-EE4A-11D0-AE2E-00A0C90FFFC3 = outputToolWindow
[<Guid(GuidList.guidFSharpProjectPkgString)>]
internal FSharpProjectPackage() as this = class
internal FSharpProjectPackage() as this =
inherit ProjectPackage()
let mutable vfsiToolWindow = Unchecked.defaultof<Microsoft.VisualStudio.FSharp.Interactive.FsiToolWindow>
......@@ -242,10 +243,8 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
// read list of available FSharp.Core versions
do
let nullService =
{
new Microsoft.VisualStudio.FSharp.ProjectSystem.IFSharpCoreVersionLookupService
with member this.ListAvailableFSharpCoreVersions(_) = Array.empty
}
{ new Microsoft.VisualStudio.FSharp.ProjectSystem.IFSharpCoreVersionLookupService with
member this.ListAvailableFSharpCoreVersions(_) = Array.empty }
let service =
match Internal.Utilities.FSharpEnvironment.BinFolderOfDefaultFSharpCompiler with
......@@ -361,13 +360,13 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
/// <param name="pbstrProductDetails">Out parameter to which to assign the description of the package</param>
/// <returns>HRESULT, indicating success or failure</returns>
member this.getProductDetails(pbstrProductDetails:byref<string>) =
pbstrProductDetails <- this.GetResourceString("@ProductDetails10") ;
pbstrProductDetails <- this.GetResourceString("@ProductDetails10")
VSConstants.S_OK
/// <param name="pIdIco">The resource id corresponding to the icon to display on the Help About dialog</param>
/// <returns>HRESULT, indicating success or failure</returns>
member this.getIdIcoLogoForAboutbox(pIdIco:byref<uint32>) =
pIdIco <- 400u ;
pIdIco <- 400u
VSConstants.S_OK
interface Microsoft.VisualStudio.FSharp.Interactive.ITestVFSI with
......@@ -375,15 +374,9 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
GetToolWindowAsITestVFSI().SendTextInteraction(s)
member this.GetMostRecentLines(n:int) : string[] =
GetToolWindowAsITestVFSI().GetMostRecentLines(n)
end // class FSharpProjectPackage
/// <summary>
/// Factory for creating our editor
/// </summary>
and (* type *)
/// Creates FSharp Projects
and /// Factory for creating our editor, creates FSharp Projects
[<Guid(GuidList.guidFSharpProjectFactoryString)>]
internal FSharpProjectFactory(package:FSharpProjectPackage ) =
inherit ProjectFactory(package)
......@@ -396,18 +389,13 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
(project :> ProjectNode)
and (* type *)
/// This class is a 'fake' project factory that is used by WAP to register WAP specific information about
and /// This class is a 'fake' project factory that is used by WAP to register WAP specific information about
/// FSharp projects.
[<Guid("4EAD5BC6-47F1-4FCB-823D-0CD64302D5B9")>]
internal WAFSharpProjectFactory() = class
end
internal WAFSharpProjectFactory() = class end
#if DESIGNER
and (* type *)
[<ComVisible(true)>]
and [<ComVisible(true)>]
[<ClassInterface(ClassInterfaceType.None)>]
[<Guid("47C65732-87AE-4C8A-8AA5-234E00E9D9AB")>]
public FSharpWPFFlavor(site:IServiceProvider) =
......@@ -422,9 +410,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override x.GetProperty(itemId:uint32, propId:int, property:byref<obj>) =
base.GetProperty(itemId, propId, &property)
and (* type *)
[<Guid("117B3E77-35E9-4f6d-4237-E6D103EA4D4A")>]
and [<Guid("117B3E77-35E9-4f6d-4237-E6D103EA4D4A")>]
internal FSharpWPFProjectFactory(site:IServiceProvider) =
inherit FlavoredProjectFactoryBase()
......@@ -436,10 +422,10 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override x.PreCreateForOuter(outerProjectIUnknown:IntPtr) = box (new FSharpWPFFlavor(site))
#endif
and (* type *)
and
[<Guid("C15CF2F6-9005-44AD-9991-683808A8E5EA")>]
internal FSharpProjectNode(package:FSharpProjectPackage) as this = class
internal FSharpProjectNode(package:FSharpProjectPackage) as this =
inherit ProjectNode()
#if FX_ATLEAST_45
......@@ -464,6 +450,10 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
let mutable inMidstOfReloading = false
// WARNING: Please avoid renaming this field or the containing type. The Visual F# Power Tools currently
// use reflection to access this field to extract project sources and flags accurately from F# projects.
// See https://github.com/fsprojects/VisualFSharpPowerTools/blob/58b8e409ee6836a39b22284740706d2cf488aabe/src/FSharpVSPowerTools.Logic/ProjectProvider.fs#L42
// for example. If necessary, this can be changed - but please just try to avoid doing a gratuitous rename.
let mutable sourcesAndFlags : option<(array<string> * array<string>)> = None
#if DEBUG
let mutable shouldLog = false // can poke this in the debugger to turn on logging
......@@ -758,7 +748,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override x.GetGuidProperty(propid:int, guid:byref<Guid> ) =
if (enum propid = __VSHPROPID.VSHPROPID_PreferredLanguageSID) then
guid <- new Guid(Microsoft.VisualStudio.FSharp.Shared.FSharpCommonConstants.languageServiceGuidString)
guid <- new Guid(FSharpCommonConstants.languageServiceGuidString)
VSConstants.S_OK
// below is how VS decide 'which templates' to associate with an 'add new item' call in this project
elif (enum propid = __VSHPROPID2.VSHPROPID_AddItemTemplatesGuid) then
......@@ -1621,7 +1611,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
sourcesAndFlagsNotifier.Advise(callbackOwnerKey,callback)
member this.AdviseProjectSiteCleaned(callbackOwnerKey,callback) =
cleanNotifier.Advise(callbackOwnerKey,callback)
member this.IsTypeResolutionValid = true
member this.IsIncompleteTypeCheckEnvironment = false
member this.TargetFrameworkMoniker = x.GetTargetFrameworkMoniker()
member this.LoadTime = creationTime
}
......@@ -1650,7 +1640,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
member ips.ErrorListTaskReporter() = taskReporter
member this.AdviseProjectSiteChanges(_,_) = ()
member this.AdviseProjectSiteCleaned(_,_) = ()
member this.IsTypeResolutionValid = true
member this.IsIncompleteTypeCheckEnvironment = false
member this.TargetFrameworkMoniker = targetFrameworkMoniker
member this.LoadTime = creationTime
}
......@@ -1790,9 +1780,8 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
member x.SetSpecificEditorProperty(_mkDocument:string, _propid:int, _value:obj ) =
VSConstants.E_NOTIMPL
end
end // class FSharpProjectNode
and (* type *)
and
// Why is this a separate class, rather than an interface implemented on
// FSharpProjectNode? Because, at the time of initial registration of this
......@@ -1918,7 +1907,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
0
and (* type *)
and
[<ComVisible(true)>]
[<CLSCompliant(false)>]
......@@ -2072,9 +2061,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
| _ -> raise <| ArgumentException(FSharpSR.GetString(FSharpSR.InvalidRunPostBuildEvent), "value")
this.Node.ProjectMgr.SetProjectProperty(ProjectFileConstants.RunPostBuildEvent, runPostBuildEventInteger)
and (* type *)
internal FSharpFolderNode(root : FSharpProjectNode, relativePath : string, projectElement : ProjectElement) =
and internal FSharpFolderNode(root : FSharpProjectNode, relativePath : string, projectElement : ProjectElement) =
inherit FolderNode(root, relativePath, projectElement)
override x.QueryStatusOnNode(guidCmdGroup:Guid, cmd:uint32, pCmdText:IntPtr, result:byref<QueryStatusResult>) =
......@@ -2105,9 +2092,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
else
base.ExecCommandOnNode(guidCmdGroup, cmd, nCmdexecopt, pvaIn, pvaOut)
and (* type *)
internal FSharpBuildAction =
and internal FSharpBuildAction =
| None = 0
| Compile = 1
| Content = 2
......@@ -2143,7 +2128,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override this.ShouldSerializeValue(o : obj) = prop.ShouldSerializeValue(o)
and (* type *)
and
[<ComVisible(true)>]
[<CLSCompliant(false)>]
......@@ -2172,10 +2157,8 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
else base.CreateDesignPropertyDescriptor(propertyDescriptor)
and (* type *)
// represents most (non-reference) nodes in the solution hierarchy of an F# project (e.g. foo.fs, bar.fsi, app.config)
internal FSharpFileNode(root:FSharpProjectNode, e:ProjectElement, hierarchyId) = class
and // Represents most (non-reference) nodes in the solution hierarchy of an F# project (e.g. foo.fs, bar.fsi, app.config)
internal FSharpFileNode(root:FSharpProjectNode, e:ProjectElement, hierarchyId) =
inherit LinkedFileNode(root,e, hierarchyId)
static let protectVisualState (root : FSharpProjectNode) (node : HierarchyNode) f =
......@@ -2699,15 +2682,9 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
#endif
else
null
end // class FSharpFileNode
and (* type *)
/// <summary>
/// Knows about special requirements for project to project references
/// </summary>
and /// Knows about special requirements for project to project references
internal FSharpProjectReferenceNode =
class
inherit ProjectReferenceNode
new(root:ProjectNode, element:ProjectElement) =
{ inherit ProjectReferenceNode(root, element) }
......@@ -2754,13 +2731,8 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
ErrorHandler.ThrowOnFailure(hierarchy.GetProperty(VSConstants.VSITEMID_ROOT, int32 __VSHPROPID.VSHPROPID_TypeName, &projectType)) |> ignore
projectType :?> string
end // class FSharpProjectReferenceNode
and (* type *)
/// <summary>
/// Reference container node for FSharp references.
/// </summary>
and /// Reference container node for FSharp references.
internal FSharpReferenceContainerNode(project:FSharpProjectNode) =
inherit ReferenceContainerNode(project :> ProjectNode)
......@@ -2775,9 +2747,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override x.CreateProjectReferenceNode(selectorData:VSCOMPONENTSELECTORDATA) =
(new FSharpProjectReferenceNode(x.ProjectMgr, selectorData.bstrTitle, selectorData.bstrFile, selectorData.bstrProjRef) :> ProjectReferenceNode)
and (* type *)
internal SelectionElementValueChangedListener(serviceProvider:Microsoft.VisualStudio.Shell.ServiceProvider, projMgr:ProjectNode ) =
and internal SelectionElementValueChangedListener(serviceProvider:Microsoft.VisualStudio.Shell.ServiceProvider, projMgr:ProjectNode ) =
inherit SelectionListener(serviceProvider)
override x.OnElementValueChanged(elementid:uint32, varValueOld:obj, _varValueNew:obj) =
......@@ -2800,9 +2770,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
hr
#if DESIGNER
and (* type *)
[<Guid(GuidList.guidEditorFactoryString)>]
and [<Guid(GuidList.guidEditorFactoryString)>]
internal EditorFactory(package :FSharpProjectPackage) = class
let mutable serviceProvider : ServiceProvider = null
......@@ -3007,16 +2975,14 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
end
end // class EditorFactory
and (* type *)
and
/// <summary>
/// This class provides the event handler generation for the
/// WPF designer. Note that this object is NOT required for languages
/// where the CodeDom is used for event handler generation. This is needed
/// in the case of FSharp due to limitations in the static compiler
/// support.
/// </summary>
FSharpEventBindingProvider(fsFile:FSharpFileNode ) = class
FSharpEventBindingProvider(fsFile:FSharpFileNode ) =
inherit EventBindingProvider()
let project = fsFile.ProjectMgr
......@@ -3166,13 +3132,8 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override x.ValidateMethodName(eventDescription:EventDescription, methodName:string) =
()
/// This method will get the CodeTypeDeclaration corresponding to the active XAML file in
/// the designer.
end // class FSharpEventBindingProvider
and (* type *)
FSharpRuntimeNameProvider() =
and FSharpRuntimeNameProvider() =
inherit RuntimeNameProvider()
override x.CreateValidName(proposal:string ) = proposal
override x.IsExistingName(name:string ) =
......@@ -3183,7 +3144,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
override x.NameFactory = (new FSharpRuntimeNameFactory() :> RuntimeNameFactory)
and (* type *)
and
[<Serializable>]
FSharpRuntimeNameFactory() =
......@@ -3226,11 +3187,7 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
isUnique <- not (provider.IsExistingName(name))
name
and (* type *)
/// <summary>
/// Add support for automation on py files.
/// </summary>
and /// Add support for automation on py files.
[<ComVisible(true)>]
[<Guid("F88F0B48-A3BA-4069-B465-AA4C8F92ECD7")>]
public OAFSharpFileItem(project:OAProject, node:FileNode) =
......@@ -3258,9 +3215,8 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
base.Open(EnvDTE.Constants.vsViewKindDesigner)
else
base.Open(viewKind)
and (* type *)
[<ComVisible(true)>]
and [<ComVisible(true)>]
public OAFSharpProject(fsharpProject:FSharpProjectNode) =
inherit OAProject(fsharpProject)
......
......@@ -15,12 +15,11 @@
<ProjectGuid>{6196B0F8-CAEA-4CF1-AF82-1B520F77FE44}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>FSharp.ProjectSystem.FSharp</AssemblyName>
<GenerateInterfaceFile>FSharp.ProjectSystem.FSharp.fsi</GenerateInterfaceFile>
<TargetType>LIBRARY</TargetType>
<NoWarn>$(NoWarn);52;75;62</NoWarn>
<UseVsVersion>true</UseVsVersion>
<OtherFlags>$(OtherFlags) --warnon:1182 --subsystemversion:6.00</OtherFlags>
<VSCTDefinitions>FX_ATLEAST_45</VSCTDefinitions>
<VSCTDefinitions>FX_ATLEAST_45</VSCTDefinitions>
<Tailcalls Condition="'$(CodeCoverage)' != ''">false</Tailcalls>
<SIGN_WITH_MSFT_KEY>true</SIGN_WITH_MSFT_KEY>
<RCResourceFile>ProjectResources.rc</RCResourceFile>
......@@ -29,13 +28,12 @@
<ItemGroup>
<VSCTCompile Include="MenusAndCommands.vsct" />
<EmbeddedResource Include="VSPackage.resx">
<MergeWithCTO>true</MergeWithCTO>
<MergeWithCTO>true</MergeWithCTO>
</EmbeddedResource>
<None Include="..\..\FSharp.VS.FSI\fsiCommands.vsct">
<Link>fsiCommands.vsct</Link>
</None>
<Compile Include="InternalsVisibleTo.fs" />
<Compile Include="..\..\Common.fs" />
<Compile Include="ProjectPrelude.fs" />
<Compile Include="MSBuildUtilities.fs" />
<Compile Include="AppConfigHelper.fs" />
......@@ -92,8 +90,8 @@
<Project>{ee85aab7-cda0-4c4e-bda0-a64ccc413e3f}</Project>
<Private>True</Private>
</ProjectReference>
<ProjectReference Include="..\..\FSharp.VS.FSI\FSharp.VS.FSI.fsproj">
<Name>FSharp.VS.FSI</Name>
<ProjectReference Include="..\..\FSharp.VS.FSI\FSHarp.VS.FSI.fsproj">
<Name>FSHarp.VS.FSI</Name>
<Project>{991dcf75-c2eb-42b6-9a0d-aa1d2409d519}</Project>
<Private>True</Private>
</ProjectReference>
......@@ -124,15 +122,12 @@
<BuildDependsOn>VSCTCompile;CopyCtoFile;$(BuildDependsOn)</BuildDependsOn>
</PropertyGroup>
<Target Name="CopyCtoFile">
<Copy
SourceFiles="@(VSCTCompile->'$(IntermediateOutputPath)%(FileName).cto')"
DestinationFiles="@(VSCTCompile->'ctofiles\%(FileName).cto')"
/>
<Copy SourceFiles="@(VSCTCompile->'$(IntermediateOutputPath)%(FileName).cto')" DestinationFiles="@(VSCTCompile->'ctofiles\%(FileName).cto')" />
</Target>
<PropertyGroup>
<Win32Resource>$(IntermediateOutputPath)\ProjectResources.rc.res</Win32Resource>
</PropertyGroup>
<Target Name="BeforeBuild">
<Exec Command='"$(ProgramFiles)\Windows Kits\8.1\bin\x86\rc.exe" /fo $(IntermediateOutputPath)$(RCResourceFile).res $(RCResourceFile)' />
<Exec Command="&quot;$(ProgramFiles)\Windows Kits\8.1\bin\x86\rc.exe&quot; /fo $(IntermediateOutputPath)$(RCResourceFile).res $(RCResourceFile)" />
</Target>
</Project>
</Project>
\ No newline at end of file
......@@ -74,10 +74,15 @@ Namespace Microsoft.VisualStudio.Editors.PropertyPages
m_OutputTypeStringKeys(INDEX_COMMANDLINEAPP) = SR.GetString(SR.PPG_CommandLineApp)
m_OutputTypeStringKeys(INDEX_WINDOWSCLASSLIB) = SR.GetString(SR.PPG_WindowsClassLib)
Dim v20FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.1\Runtime\v2.0"
Dim v40FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.1\Runtime\v4.0"
#If VS_VERSION_DEV14 Then
Dim v20FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.0\Runtime\v2.0"
Dim v40FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.0\Runtime\v4.0"
#Else
Dim v20FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.1\Runtime\v2.0"
Dim v40FSharpRedistKey As String = "HKEY_LOCAL_MACHINE\Software\Microsoft\FSharp\4.1\Runtime\v4.0"
#End If
m_v20FSharpRedistInstalled = Not (IsNothing(Microsoft.Win32.Registry.GetValue(v20FSharpRedistKey, Nothing, Nothing)))
m_v20FSharpRedistInstalled = Not (IsNothing(Microsoft.Win32.Registry.GetValue(v20FSharpRedistKey, Nothing, Nothing)))
m_v40FSharpRedistInstalled = Not (IsNothing(Microsoft.Win32.Registry.GetValue(v40FSharpRedistKey, Nothing, Nothing)))
'Add any initialization after the InitializeComponent() call
......
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -->
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<FSharpSourcesRoot>..\..\..\..\..\src</FSharpSourcesRoot>
<ProjectLanguage>FSharp</ProjectLanguage>
<SIGN_WITH_MSFT_KEY>true</SIGN_WITH_MSFT_KEY>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.settings.targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{991dcf75-c2eb-42b6-9a0d-aa1d2409d519}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>FSharp.VS.FSI</AssemblyName>
<UseVsVersion>true</UseVsVersion>
<TargetType>LIBRARY</TargetType>
<NoWarn>$(NoWarn);47;75</NoWarn>
<OtherFlags>$(OtherFlags) --subsystemversion:6.00</OtherFlags>
</PropertyGroup>
<ItemGroup>
<FsSrGen Include="VFSIstrings.txt" />
<Compile Include="InternalsVisibleTo.fs" />
<Compile Include="srProperties.fs" />
<Compile Include="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs" />
<Compile Include="quickparse.fs" />
<Compile Include="sessions.fs" />
<Compile Include="fsiBasis.fs" />
<Compile Include="fsiLanguageService.fs" />
<Compile Include="fsiTextBufferStream.fs" />
<Compile Include="fsiSessionToolWindow.fs" />
<Compile Include="fsiPackageHooks.fs" />
<Compile Include="fsiPackage.fs" />
<EmbeddedResource Include="Properties.resx">
<ManifestResourceName>Properties</ManifestResourceName>
<Link>Properties.resx</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.OLE.Interop.dll"/>
<Reference Include="Microsoft.VisualStudio.Package.LanguageService.$(VisualStudioVersion)" />
<Reference Include="EnvDTE.dll" />
<Reference Include="EnvDTE80.dll" />
<Reference Include="VSLangProj" />
<Reference Include="VSLangProj80" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.$(VisualStudioVersion)" />
<Reference Include="Microsoft.VisualStudio.Utilities, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition="'$(VisualStudioVersion)' != '12.0'" />
<Reference Include="Microsoft.VisualStudio.Threading, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Design, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.ProjectAggregator" />
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0.dll" />
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.10.0.dll" />
<Reference Include="Microsoft.VisualStudio.Designer.Interfaces" />
<Reference Include="Microsoft.VisualStudio.VSHelp.dll" />
<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.Logic, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.UI, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.ComponentModelHost, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Editor, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="mscorlib" />
<Reference Include="System"/>
<Reference Include="PresentationFramework"/>
<Reference Include="PresentationCore"/>
<Reference Include="WindowsBase"/>
<Reference Include="System.Xaml"/>
<Reference Include="System.Core"/>
<Reference Include="System.Data"/>
<Reference Include="System.Design"/>
<Reference Include="System.Drawing"/>
<Reference Include="System.Windows.Forms"/>
<Reference Include="System.Xml"/>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
<Name>FSharp.Core</Name>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj" >
<Name>FSharp.Compiler.Server.Shared</Name>
<Project>{d5870cf0-ed51-4cbc-b3d7-6f56da84ac06}</Project>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
<Name>FSharp.Compiler</Name>
<Project>{62499922-7085-43bd-b9f2-bb352bfbc408}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
</Project>
<PropertyGroup>
<FSharpSourcesRoot>..\..\..\..\..\src</FSharpSourcesRoot>
<ProjectLanguage>FSharp</ProjectLanguage>
<SIGN_WITH_MSFT_KEY>true</SIGN_WITH_MSFT_KEY>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<Name>FSharp.VS.FSI</Name>
</PropertyGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.settings.targets" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{991dcf75-c2eb-42b6-9a0d-aa1d2409d519}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>FSharp.VS.FSI</AssemblyName>
<UseVsVersion>true</UseVsVersion>
<TargetType>LIBRARY</TargetType>
<NoWarn>$(NoWarn);47;75</NoWarn>
<OtherFlags>$(OtherFlags) --subsystemversion:6.00</OtherFlags>
</PropertyGroup>
<ItemGroup>
<FsSrGen Include="VFSIstrings.txt" />
<Compile Include="InternalsVisibleTo.fs" />
<Compile Include="srProperties.fs" />
<Compile Include="$(FSharpSourcesRoot)\utils\CompilerLocationUtils.fs">
<Link>CompilerLocationUtils.fs</Link>
</Compile>
<Compile Include="quickparse.fs" />
<Compile Include="sessions.fs" />
<Compile Include="fsiBasis.fs" />
<Compile Include="fsiLanguageService.fs" />
<Compile Include="fsiTextBufferStream.fs" />
<Compile Include="fsiSessionToolWindow.fs" />
<Compile Include="fsiPackageHooks.fs" />
<Compile Include="fsiPackage.fs" />
<EmbeddedResource Include="Properties.resx">
<ManifestResourceName>Properties</ManifestResourceName>
<Link>Properties.resx</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.OLE.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.Package.LanguageService.$(VisualStudioVersion)" />
<Reference Include="EnvDTE.dll" />
<Reference Include="EnvDTE80.dll" />
<Reference Include="VSLangProj" />
<Reference Include="VSLangProj80" />
<Reference Include="Microsoft.VisualStudio.OLE.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.$(VisualStudioVersion)" />
<Reference Include="Microsoft.VisualStudio.Utilities, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Condition="'$(VisualStudioVersion)' != '12.0'" />
<Reference Include="Microsoft.VisualStudio.Threading, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.8.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.9.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.10.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.11.0.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.Shell.Design, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.ProjectAggregator" />
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.dll" />
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.8.0.dll" />
<Reference Include="Microsoft.VisualStudio.TextManager.Interop.10.0.dll" />
<Reference Include="Microsoft.VisualStudio.Designer.Interfaces" />
<Reference Include="Microsoft.VisualStudio.VSHelp.dll" />
<Reference Include="Microsoft.VisualStudio.CoreUtility, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.Data, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.Logic, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.UI, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Text.UI.Wpf, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.ComponentModelHost, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="Microsoft.VisualStudio.Editor, Version=$(VisualStudioVersion).0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="PresentationFramework" />
<Reference Include="PresentationCore" />
<Reference Include="WindowsBase" />
<Reference Include="System.Xaml" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Core\FSharp.Core.fsproj">
<Project>{DED3BBD7-53F4-428A-8C9F-27968E768605}</Project>
<Name>FSharp.Core</Name>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler.Server.Shared\FSharp.Compiler.Server.Shared.fsproj">
<Name>FSharp.Compiler.Server.Shared</Name>
<Project>{d5870cf0-ed51-4cbc-b3d7-6f56da84ac06}</Project>
</ProjectReference>
<ProjectReference Include="$(FSharpSourcesRoot)\fsharp\FSharp.Compiler\FSharp.Compiler.fsproj">
<Name>FSharp.Compiler</Name>
<Project>{62499922-7085-43bd-b9f2-bb352bfbc408}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(FSharpSourcesRoot)\FSharpSource.targets" />
</Project>
\ No newline at end of file
// Copyright (c) Microsoft Open Technologies, Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.VisualStudio.FSharp.Shared
module internal FSharpCommonConstants =
[<Literal>]
let languageServiceGuidString = "BC6DD5A5-D4D6-4dab-A00D-A51242DBAF1B"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册