ifthis.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)
ifthis.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
ifthis.SawIBDeleted()then("The incremental builder was UNEXPECTEDLY deleted",false)else("",true)
ifthis.SawIBCreated()then("The incremental builder was UNEXPECTEDLY deleted",false)else("",true)
// 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.
// 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.
// 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.
// 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.
// 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.
namespaceUnitTests.Tests.LanguageService
namespaceTests.LanguageService.AutoCompletion
openSystem
openSalsa.Salsa
openSalsa.VsMocks
openSalsa.VsOpsUtils
openNUnit.Framework
openUnitTests.TestLib.Salsa
openUnitTests.TestLib.Utils
openSalsa.Salsa
openUnitTests.TestLib.LanguageService
openUnitTests.TestLib.ProjectSystem
[<AutoOpen>]
moduleStandardSettings=
...
...
@@ -24,7 +24,8 @@ module StandardSettings =
letACxy=AutoCompleteExpected(x,y)
letDCxy=DotCompleteExpected(x,y)
typeAutoCompletionListTests()asthis=
[<TestFixture>]
typeUsingMSBuild()asthis=
inheritLanguageServiceBaseTests()
letcreateFile(code:list<string>)fileKindrefs=
...
...
@@ -230,6 +231,28 @@ type AutoCompletionListTests() as this =
letcompletions=time1AutoCompleteAtCursorfile"Time of first autocomplete."
AssertCompListIsEmpty(completions)
/////Helper Functios
//DotCompList ContainAll At End Of Marker Helper Function
// 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.
letexpectedStr="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=...>'."
// 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.
namespaceUnitTests.Tests.LanguageService
namespaceTests.LanguageService.ErrorRecovery
openSystem
openSystem.IO
...
...
@@ -10,8 +10,10 @@ open Salsa.VsOpsUtils
openUnitTests.TestLib.Salsa
openUnitTests.TestLib.Utils
openUnitTests.TestLib.LanguageService
openUnitTests.TestLib.ProjectSystem
typeErrorRecoveryTests()=
[<TestFixture>]
typeUsingMSBuild()=
inheritLanguageServiceBaseTests()
//Verify the error list containd the expected string
...
...
@@ -263,24 +265,8 @@ type ErrorRecoveryTests() =
]
)
//Allow the TimeStampTests run under different context
// 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.
// 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.
// 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.
// 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.
namespaceUnitTests.Tests.LanguageService
namespaceTests.LanguageService.NavigationBar
openSystem
openNUnit.Framework
...
...
@@ -9,64 +9,15 @@ open Salsa.VsOpsUtils
openUnitTests.TestLib.Salsa
openUnitTests.TestLib.Utils
openUnitTests.TestLib.LanguageService
openUnitTests.TestLib.ProjectSystem
typeNavigationBarTests()=
[<TestFixture>]
typeUsingMSBuild()=
inheritLanguageServiceBaseTests()
(* Unit tests for collapse region & navigation bar ------------------------------------- *)
// 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.
// 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.
namespaceUnitTests.Tests.LanguageService
namespaceTests.LanguageService.Script
openSystem
openSystem.IO
...
...
@@ -10,8 +10,10 @@ open Salsa.VsOpsUtils
openUnitTests.TestLib.Salsa
openUnitTests.TestLib.Utils
openUnitTests.TestLib.LanguageService
openUnitTests.TestLib.ProjectSystem
typeScriptTests()asthis=
[<TestFixture>]
typeUsingMSBuild()asthis=
inheritLanguageServiceBaseTests()
letnotAAl=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
// 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.
"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
"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=...>'."),
"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=...>'."),
// 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.
TakeCoffeeBreak(this.VS)// Dependencies between projects get registered for file-watching during OnIdle processing
SwitchToFilethis.VSfile2
MoveCursorToEndOfMarker(file2,"File1.File1.")
letcompletions=AutoCompleteAtCursor(file2)
Assert.AreEqual(0,completions.Length)
...
...
@@ -250,6 +254,7 @@ type TimeStampTests() =
SaveFileToDiskfile1
time1Buildproject1"Time to build project1 second time"|>ignore
TakeCoffeeBreak(this.VS)// Give enough time to catch up
SwitchToFilethis.VSfile2
MoveCursorToEndOfMarker(file2,"File1.File1.")
TakeCoffeeBreak(this.VS)// Give enough time to catch up
letcompletions=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
SwitchToFilethis.VSfile2
MoveCursorToEndOfMarker(file2,"File1.File1.")
letcompletions=AutoCompleteAtCursor(file2)
Assert.AreEqual(0,completions.Length)
...
...
@@ -302,6 +308,7 @@ type TimeStampTests() =
SaveFileToDiskfile1
time1Buildproject1"Time to build project1 second time"|>ignore
TakeCoffeeBreak(this.VS)// Give enough time to catch up
SwitchToFilethis.VSfile2
MoveCursorToEndOfMarker(file2,"File1.File1.")
TakeCoffeeBreak(this.VS)// Give enough time to catch up
letcompletions=AutoCompleteAtCursor(file2)
...
...
@@ -310,23 +317,14 @@ type TimeStampTests() =
//Allow the TimeStampTests run under different context
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
// 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.
namespaceUnitTests.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)
*)
namespaceTests.Compiler.Watson
#nowarn"52"// The value has been copied to ensure the original is not mutated
// 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")
// 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")
// 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.
<!-- 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. -->
@@ -464,6 +450,10 @@ See also ...\SetupAuthoring\FSharp\Registry\FSProjSys_Registration.wxs, e.g.
letmutableinMidstOfReloading=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.
<!-- 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. -->
// 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.