This commit is contained in:
KevinRansom 2016-03-09 21:15:32 -08:00
Родитель 74ef502c8d b297b1a08b
Коммит b1894c6e21
56 изменённых файлов: 1412 добавлений и 1250 удалений

Просмотреть файл

@ -7,7 +7,7 @@
| |Debug (Build only)|Release (Build only)|Release (Build and tests)|
|:----------:|:----------------:|:------------------:|:-----------------------:|
|**master** |[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Microsoft_visualfsharp/debug_windows_nt)](http://dotnet-ci.cloudapp.net/job/Microsoft_visualfsharp/job/debug_windows_nt/)|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Microsoft_visualfsharp/release_windows_nt)](http://dotnet-ci.cloudapp.net/job/Microsoft_visualfsharp/job/release_windows_nt/)| [![Build status](https://img.shields.io/appveyor/ci/KevinRansom/visualfsharp-radou/master.svg)](https://ci.appveyor.com/project/KevinRansom/visualfsharp-radou/branch/master) |
|**master** |[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Microsoft_visualfsharp/master/debug_windows_nt)](http://dotnet-ci.cloudapp.net/job/Microsoft_visualfsharp/job/master/job/debug_windows_nt/)|[![Build Status](http://dotnet-ci.cloudapp.net/buildStatus/icon?job=Microsoft_visualfsharp/master/release_windows_nt)](http://dotnet-ci.cloudapp.net/job/Microsoft_visualfsharp/job/master/job/release_windows_nt/)| [![Build status](https://img.shields.io/appveyor/ci/KevinRansom/visualfsharp-radou/master.svg)](https://ci.appveyor.com/project/KevinRansom/visualfsharp-radou/branch/master) |
|**vs2015** ||| [![Build status](https://img.shields.io/appveyor/ci/KevinRansom/visualfsharp-radou/vs2015.svg)](https://ci.appveyor.com/project/KevinRansom/visualfsharp-radou/branch/vs2015) |
|**coreclr** ||| [![Build status](https://img.shields.io/appveyor/ci/KevinRansom/visualfsharp-radou/coreclr.svg)](https://ci.appveyor.com/project/KevinRansom/visualfsharp-radou/branch/coreclr) |

Просмотреть файл

@ -5,16 +5,24 @@ environment:
- BUILD_PROFILE: ci_part1
- BUILD_PROFILE: ci_part2
init:
init:
- git config --global core.autocrlf true
build_script:
- cmd: build.cmd %BUILD_PROFILE%
# scripts that run after cloning repository
install:
# by default, all script lines are interpreted as batch
# by default, all script lines are interpreted as batch
test: off
version: 0.0.1.{build}
artifacts:
- path: Release
name: Release
name: Release
- path: tests\TestResults
name: TestResults
type: zip
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

Просмотреть файл

@ -92,6 +92,7 @@ if /i '%ARG%' == 'all' (
REM Same as 'all' but smoke testing only
if /i '%ARG%' == 'ci' (
set SKIP_EXPENSIVE_TESTS=1
set BUILD_PORTABLE=1
set BUILD_VS=1
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
@ -109,6 +110,7 @@ if /i '%ARG%' == 'ci' (
REM These divide 'ci' into three chunks which can be done in parallel
if /i '%ARG%' == 'ci_part1' (
set SKIP_EXPENSIVE_TESTS=1
set BUILD_PORTABLE=1
set BUILD_VS=1
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
@ -117,21 +119,22 @@ if /i '%ARG%' == 'ci_part1' (
set TEST_NET40_COREUNIT=1
set TEST_PORTABLE_COREUNIT=1
set TEST_CORECLR=1
set TEST_VS=0
set TEST_TAGS=
set TEST_VS=1
)
if /i '%ARG%' == 'ci_part2' (
set SKIP_EXPENSIVE_TESTS=1
set BUILD_PORTABLE=1
set BUILD_FSHARP_DATA_TYPEPROVIDERS=1
set TEST_FSHARPQA_SUITE=1
set TEST_FSHARP_SUITE=1
set TEST_TAGS=
)
if /i '%ARG%' == 'smoke' (
REM Smoke tests are a very small quick subset of tests
set SKIP_EXPENSIVE_TESTS=1
set TEST_COMPILERUNIT=0
set TEST_NET40_COREUNIT=0
set TEST_FSHARP_SUITE=1
@ -162,6 +165,8 @@ echo BUILD_CORECLR=%BUILD_CORECLR%
echo BUILD_PORTABLE=%BUILD_PORTABLE%
echo BUILD_VS=%BUILD_VS%
echo BUILD_FSHARP_DATA_TYPEPROVIDERS=%BUILD_FSHARP_DATA_TYPEPROVIDERS%
echo BUILD_CONFIG=%BUILD_CONFIG%
echo BUILD_CONFIG_LOWERCASE=%BUILD_CONFIG_LOWERCASE%
echo.
echo TEST_COMPILERUNIT=%TEST_COMPILERUNIT%
echo TEST_PORTABLE_COREUNIT=%TEST_PORTABLE_COREUNIT%
@ -169,8 +174,6 @@ echo TEST_VS=%TEST_VS%
echo TEST_FSHARP_SUITE=%TEST_FSHARP_SUITE%
echo TEST_FSHARPQA_SUITE=%TEST_FSHARPQA_SUITE%
echo TEST_TAGS=%TEST_TAGS%
echo BUILD_CONFIG=%BUILD_CONFIG%
echo BUILD_CONFIG_LOWERCASE=%BUILD_CONFIG_LOWERCASE%
echo.
REM Remove lingering copies of the OSS FSharp.Core from the GAC
@ -182,8 +185,6 @@ if "%RestorePackages%"=="" (
@echo on
set APPVEYOR_CI=1
:: Check prerequisites
if not '%VisualStudioVersion%' == '' goto vsversionset
if exist "%VS140COMNTOOLS%..\ide\devenv.exe" set VisualStudioVersion=14.0
@ -329,7 +330,7 @@ if '%BUILD_VS%' == '1' (
call src\update.cmd %BUILD_CONFIG_LOWERCASE% -ngen
REM This clobbers the installed F# SDK on the machine
REM call vsintegration\update-vsintegration.cmd %BUILD_CONFIG_LOWERCASE%
call vsintegration\update-vsintegration.cmd %BUILD_CONFIG_LOWERCASE%
pushd tests
@echo on

Просмотреть файл

@ -1,6 +1,7 @@
import jobs.generation.Utilities;
def project = GithubProject
def branch = GithubBranchName
def osList = ['Windows_NT'] //'Ubuntu', 'OSX', 'CentOS7.1'
@ -48,9 +49,17 @@ def static getBuildJobName(def configuration, def os) {
// TODO: set to false after tests are fully enabled
def skipIfNoTestFiles = true
Utilities.simpleInnerLoopJobSetup(newJob, project, isPullRequest, "Jenkins ${os} ${configuration}")
Utilities.addXUnitDotNETResults(newJob, 'tests/TestResults/**/*_Xml.xml', skipIfNoTestFiles)
Utilities.addArchival(newJob, "${lowerConfiguration}/**")
Utilities.setMachineAffinity(newJob, os, 'latest-or-auto')
Utilities.standardJobSetup(newJob, project, isPullRequest, "*/${branch}")
Utilities.addXUnitDotNETResults(newJob, 'tests/TestResults/**/*_Xml.xml', skipIfNoTestFiles)
Utilities.addArchival(newJob, "${lowerConfiguration}/**")
if (isPullRequest) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build")
}
else {
Utilities.addGithubPushTrigger(newJob)
}
}
}
}

Просмотреть файл

@ -41,6 +41,34 @@ type ArrayModule() =
()
[<Test>]
member this.AllPairs() =
// integer array
let resultInt = Array.allPairs [|1..3|] [|2..2..6|]
if resultInt <> [|(1,2);(1,4);(1,6)
(2,2);(2,4);(2,6)
(3,2);(3,4);(3,6)|] then Assert.Fail()
// string array
let resultStr = Array.allPairs [|"A"; "B"; "C" ; "D" |] [|"a";"b";"c";"d"|]
if resultStr <> [|("A","a");("A","b");("A","c");("A","d")
("B","a");("B","b");("B","c");("B","d")
("C","a");("C","b");("C","c");("C","d")
("D","a");("D","b");("D","c");("D","d")|] then Assert.Fail()
// empty array
if Array.allPairs [||] [||] <> [||] then Assert.Fail()
if Array.allPairs [|1..3|] [||] <> [||] then Assert.Fail()
if Array.allPairs [||] [|1..3|] <> [||] then Assert.Fail()
// null array
let nullArr = null:string[]
CheckThrowsArgumentNullException (fun () -> Array.allPairs nullArr nullArr |> ignore)
CheckThrowsArgumentNullException (fun () -> Array.allPairs [||] nullArr |> ignore)
CheckThrowsArgumentNullException (fun () -> Array.allPairs nullArr [||] |> ignore)
()
[<Test>]
member this.Append() =
// integer array

Просмотреть файл

@ -8,6 +8,18 @@ open NUnit.Framework
open FsCheck
open Utils
let allPairs<'a when 'a : equality> (xs : list<'a>) (xs2 : list<'a>) =
let s = xs |> Seq.allPairs xs2
let l = xs |> List.allPairs xs2
let a = xs |> Seq.toArray |> Array.allPairs (Seq.toArray xs2)
Seq.toArray s = a && List.toArray l = a
[<Test>]
let ``allPairs is consistent`` () =
Check.QuickThrowOnFailure allPairs<int>
Check.QuickThrowOnFailure allPairs<string>
Check.QuickThrowOnFailure allPairs<NormalFloat>
let append<'a when 'a : equality> (xs : list<'a>) (xs2 : list<'a>) =
let s = xs |> Seq.append xs2
let l = xs |> List.append xs2

Просмотреть файл

@ -30,6 +30,28 @@ type ListModule() =
()
[<Test>]
member this.AllPairs() =
// integer List
let resultInt = List.allPairs [1..3] [2..2..6]
Assert.AreEqual([(1,2);(1,4);(1,6)
(2,2);(2,4);(2,6)
(3,2);(3,4);(3,6)], resultInt)
// string List
let resultStr = List.allPairs [2;3;4;5] ["b";"c";"d";"e"]
Assert.AreEqual([(2,"b");(2,"c");(2,"d");(2,"e")
(3,"b");(3,"c");(3,"d");(3,"e")
(4,"b");(4,"c");(4,"d");(4,"e")
(5,"b");(5,"c");(5,"d");(5,"e")] , resultStr)
// empty List
let resultEpt = List.allPairs [] []
let empTuple:(obj*obj) list = []
Assert.AreEqual(empTuple, resultEpt)
()
[<Test>]
member this.Append() =
// integer List

Просмотреть файл

@ -823,3 +823,35 @@ let ``List.sumBy calculates the sum of the mapped list`` () =
Check.QuickThrowOnFailure sumBy<int>
Check.QuickThrowOnFailure sumBy<string>
Check.QuickThrowOnFailure sumBy<float>
let allPairsCount<'a, 'b> (xs : 'a list) (ys : 'b list) =
let pairs = List.allPairs xs ys
pairs.Length = xs.Length * ys.Length
[<Test>]
let ``List.allPairs produces the correct number of pairs`` () =
Check.QuickThrowOnFailure allPairsCount<int, int>
Check.QuickThrowOnFailure allPairsCount<string, string>
Check.QuickThrowOnFailure allPairsCount<float, float>
let allPairsFst<'a, 'b when 'a : equality> (xs : 'a list) (ys : 'b list) =
let pairsFst = List.allPairs xs ys |> List.map fst
let check = xs |> List.collect (List.replicate ys.Length)
pairsFst = check
[<Test>]
let ``List.allPairs first elements are correct`` () =
Check.QuickThrowOnFailure allPairsFst<int, int>
Check.QuickThrowOnFailure allPairsFst<string, string>
Check.QuickThrowOnFailure allPairsFst<NormalFloat, NormalFloat>
let allPairsSnd<'a, 'b when 'b : equality> (xs : 'a list) (ys : 'b list) =
let pairsSnd = List.allPairs xs ys |> List.map snd
let check = [ for i in 1 .. xs.Length do yield! ys ]
pairsSnd = check
[<Test>]
let ``List.allPairs second elements are correct`` () =
Check.QuickThrowOnFailure allPairsFst<int, int>
Check.QuickThrowOnFailure allPairsFst<string, string>
Check.QuickThrowOnFailure allPairsFst<NormalFloat, NormalFloat>

Просмотреть файл

@ -22,6 +22,33 @@ Make sure each method works on:
[<TestFixture>]
type SeqModule() =
[<Test>]
member this.AllPairs() =
// integer Seq
let resultInt = Seq.allPairs (seq [1..7]) (seq [11..17])
let expectedInt =
seq { for i in 1..7 do
for j in 11..17 do
yield i, j }
VerifySeqsEqual expectedInt resultInt
// string Seq
let resultStr = Seq.allPairs (seq ["str3";"str4"]) (seq ["str1";"str2"])
let expectedStr = seq ["str3","str1";"str3","str2";"str4","str1";"str4","str2"]
VerifySeqsEqual expectedStr resultStr
// empty Seq
VerifySeqsEqual Seq.empty <| Seq.allPairs Seq.empty Seq.empty
VerifySeqsEqual Seq.empty <| Seq.allPairs { 1..7 } Seq.empty
VerifySeqsEqual Seq.empty <| Seq.allPairs Seq.empty { 1..7 }
// null Seq
CheckThrowsArgumentNullException(fun() -> Seq.allPairs null null |> ignore)
CheckThrowsArgumentNullException(fun() -> Seq.allPairs null (seq [1..7]) |> ignore)
CheckThrowsArgumentNullException(fun() -> Seq.allPairs (seq [1..7]) null |> ignore)
()
[<Test>]
member this.CachedSeq_Clear() =

Просмотреть файл

@ -100,6 +100,7 @@ Microsoft.FSharp.Collections.ArrayModule: System.Collections.Generic.IEnumerable
Microsoft.FSharp.Collections.ArrayModule: System.String ToString()
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[System.Int32,T][] Indexed[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T,T][] Pairwise[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] AllPairs[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] Zip[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1[],T2[]] Unzip[T1,T2](System.Tuple`2[T1,T2][])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,System.Int32][] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[])
@ -296,6 +297,7 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] Zip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,Microsoft.FSharp.Collections.FSharpList`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
@ -432,6 +434,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T]
Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] Zip[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Collections.Generic.IEnumerable`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])

Просмотреть файл

@ -87,6 +87,7 @@ Microsoft.FSharp.Collections.ArrayModule: System.Collections.Generic.IEnumerable
Microsoft.FSharp.Collections.ArrayModule: System.String ToString()
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[System.Int32,T][] Indexed[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T,T][] Pairwise[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] AllPairs[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] Zip[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1[],T2[]] Unzip[T1,T2](System.Tuple`2[T1,T2][])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,System.Int32][] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[])
@ -283,6 +284,7 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] Zip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,Microsoft.FSharp.Collections.FSharpList`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
@ -419,6 +421,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T]
Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] Zip[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Collections.Generic.IEnumerable`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])

Просмотреть файл

@ -84,6 +84,7 @@ Microsoft.FSharp.Collections.ArrayModule: System.Collections.Generic.IEnumerable
Microsoft.FSharp.Collections.ArrayModule: System.String ToString()
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[System.Int32,T][] Indexed[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T,T][] Pairwise[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] AllPairs[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] Zip[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1[],T2[]] Unzip[T1,T2](System.Tuple`2[T1,T2][])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,System.Int32][] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[])
@ -280,6 +281,7 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] Zip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,Microsoft.FSharp.Collections.FSharpList`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
@ -416,6 +418,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T]
Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] Zip[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Collections.Generic.IEnumerable`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])

Просмотреть файл

@ -100,6 +100,7 @@ Microsoft.FSharp.Collections.ArrayModule: System.Collections.Generic.IEnumerable
Microsoft.FSharp.Collections.ArrayModule: System.String ToString()
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[System.Int32,T][] Indexed[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T,T][] Pairwise[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] AllPairs[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] Zip[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1[],T2[]] Unzip[T1,T2](System.Tuple`2[T1,T2][])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,System.Int32][] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[])
@ -296,6 +297,7 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] Zip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,Microsoft.FSharp.Collections.FSharpList`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
@ -432,6 +434,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T]
Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] Zip[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Collections.Generic.IEnumerable`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])

Просмотреть файл

@ -87,6 +87,7 @@ Microsoft.FSharp.Collections.ArrayModule: System.Collections.Generic.IEnumerable
Microsoft.FSharp.Collections.ArrayModule: System.String ToString()
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[System.Int32,T][] Indexed[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T,T][] Pairwise[T](T[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] AllPairs[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1,T2][] Zip[T1,T2](T1[], T2[])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[T1[],T2[]] Unzip[T1,T2](System.Tuple`2[T1,T2][])
Microsoft.FSharp.Collections.ArrayModule: System.Tuple`2[TKey,System.Int32][] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], T[])
@ -283,6 +284,7 @@ Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[Microsoft.FSharp.Collections.FSharpList`1[T]] Windowed[T](Int32, Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[System.Int32,T]] Indexed[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T,T]] Pairwise[T](Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[T1,T2]] Zip[T1,T2](Microsoft.FSharp.Collections.FSharpList`1[T1], Microsoft.FSharp.Collections.FSharpList`1[T2])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,Microsoft.FSharp.Collections.FSharpList`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
Microsoft.FSharp.Collections.ListModule: Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], Microsoft.FSharp.Collections.FSharpList`1[T])
@ -419,6 +421,7 @@ Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T]
Microsoft.FSharp.Collections.SeqModule: Microsoft.FSharp.Core.FSharpOption`1[T] TryLast[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[System.Int32,T]] Indexed[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T,T]] Pairwise[T](System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] AllPairs[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[T1,T2]] Zip[T1,T2](System.Collections.Generic.IEnumerable`1[T1], System.Collections.Generic.IEnumerable`1[T2])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Collections.Generic.IEnumerable`1[T]]] GroupBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])
Microsoft.FSharp.Collections.SeqModule: System.Collections.Generic.IEnumerable`1[System.Tuple`2[TKey,System.Int32]] CountBy[T,TKey](Microsoft.FSharp.Core.FSharpFunc`2[T,TKey], System.Collections.Generic.IEnumerable`1[T])

Просмотреть файл

@ -384,7 +384,7 @@ namespace Microsoft.FSharp.Collections
checkNonNull "array" array
let len = array.Length
let rec loop i = i < len && (f array.[i] || loop (i+1))
loop 0
len > 0 && loop 0
[<CompiledName("Contains")>]
let inline contains e (array:'T[]) =
@ -648,6 +648,18 @@ namespace Microsoft.FSharp.Collections
res.[i] <- (array1.[i],array2.[i],array3.[i])
res
[<CompiledName("AllPairs")>]
let allPairs (array1: _[]) (array2: _[]) =
checkNonNull "array1" array1
checkNonNull "array2" array2
let len1 = array1.Length
let len2 = array2.Length
let res = Microsoft.FSharp.Primitives.Basics.Array.zeroCreateUnchecked (len1 * len2)
for i = 0 to len1 - 1 do
for j = 0 to len2 - 1 do
res.[i * len2 + j] <- (array1.[i],array2.[j])
res
[<CompiledName("Unfold")>]
let unfold<'T,'State> (f:'State -> ('T*'State) option) (s:'State) =
let res = ResizeArray<_>()

Просмотреть файл

@ -12,6 +12,14 @@ namespace Microsoft.FSharp.Collections
[<RequireQualifiedAccess>]
module Array =
/// <summary>Builds a new array that contains the cartesian product of the two input arrays.</summary>
/// <param name="array1">The first input array.</param>
/// <param name="array2">The second input array.</param>
/// <exception cref="System.ArgumentNullException">Thrown when either of the input arrays is null.</exception>
/// <returns>The resulting array of pairs.</returns>
[<CompiledName("AllPairs")>]
val allPairs: array1:'T1[] -> array2:'T2[] -> ('T1 * 'T2)[]
/// <summary>Builds a new array that contains the elements of the first array followed by the elements of the second array.</summary>
/// <param name="array1">The first input array.</param>
/// <param name="array2">The second input array.</param>

Просмотреть файл

@ -616,6 +616,9 @@ namespace Microsoft.FSharp.Collections
[<CompiledName("Collect")>]
let collect f list = Microsoft.FSharp.Primitives.Basics.List.collect f list
[<CompiledName("AllPairs")>]
let allPairs list1 list2 = Microsoft.FSharp.Primitives.Basics.List.allPairs list1 list2
[<CompiledName("CompareWith")>]
let inline compareWith (comparer:'T -> 'T -> int) (list1: 'T list) (list2: 'T list) =
let rec loop list1 list2 =

Просмотреть файл

@ -12,6 +12,13 @@ namespace Microsoft.FSharp.Collections
[<RequireQualifiedAccess>]
module List =
/// <summary>Returns a new list that contains the cartesian product of the two input lists.</summary>
/// <param name="list1">The first input list.</param>
/// <param name="list2">The second input list.</param>
/// <returns>The resulting list of pairs.</returns>
[<CompiledName("AllPairs")>]
val allPairs: list1:'T1 list -> list2:'T2 list -> ('T1 * 'T2) list
/// <summary>Returns a new list that contains the elements of the first list
/// followed by elements of the second.</summary>
/// <param name="list1">The first input list.</param>

Просмотреть файл

@ -224,6 +224,30 @@ module internal List =
collectToFreshConsTail f list cons
cons.Tail
let rec allPairsToFreshConsTailSingle x ys cons =
match ys with
| [] -> cons
| (h2::t2) ->
let cons2 = freshConsNoTail (x,h2)
setFreshConsTail cons cons2
allPairsToFreshConsTailSingle x t2 cons2
let rec allPairsToFreshConsTail xs ys cons =
match xs with
| [] -> setFreshConsTail cons []
| (h::t) ->
let p = allPairsToFreshConsTailSingle h ys cons
allPairsToFreshConsTail t ys p
let allPairs (xs:'T list) (ys:'U list) =
match xs, ys with
| _, [] -> []
| [], _ -> []
| _ ->
let cons = freshConsNoTail (Unchecked.defaultof<'T * 'U>)
allPairsToFreshConsTail xs ys cons
cons.Tail
// optimized mutation-based implementation. This code is only valid in fslib, where mutation of private
// tail cons cells is permitted in carefully written library code.
let rec filterToFreshConsTail cons f l =

Просмотреть файл

@ -7,6 +7,7 @@ open Microsoft.FSharp.Core
open Microsoft.FSharp.Collections
module internal List =
val allPairs : 'T1 list -> 'T2 list -> ('T1 * 'T2) list
val distinctWithComparer : System.Collections.Generic.IEqualityComparer<'T> -> 'T list -> 'T list
val distinctByWithComparer : System.Collections.Generic.IEqualityComparer<'Key> -> ('T -> 'Key) -> list:'T list -> 'T list when 'Key : equality
val init : int -> (int -> 'T) -> 'T list

Просмотреть файл

@ -1442,6 +1442,13 @@ namespace Microsoft.FSharp.Collections
enumeratorR := None)
(new CachedSeq<_>(cleanup, result) :> seq<_>)
[<CompiledName("AllPairs")>]
let allPairs source1 source2 =
checkNonNull "source1" source1
checkNonNull "source2" source2
let cached = cache source2
source1 |> collect (fun x -> cached |> map (fun y -> x,y))
[<CodeAnalysis.SuppressMessage("Microsoft.Naming","CA1709:IdentifiersShouldBeCasedCorrectly"); CodeAnalysis.SuppressMessage("Microsoft.Naming","CA1707:IdentifiersShouldNotContainUnderscores"); CodeAnalysis.SuppressMessage("Microsoft.Naming","CA1704:IdentifiersShouldBeSpelledCorrectly")>]
[<CompiledName("ReadOnly")>]
let readonly (source:seq<_>) =

Просмотреть файл

@ -14,6 +14,14 @@ namespace Microsoft.FSharp.Collections
[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Seq =
/// <summary>Returns a new sequence that contains the cartesian product of the two input sequences.</summary>
/// <param name="source1">The first sequence.</param>
/// <param name="source2">The second sequence.</param>
/// <returns>The result sequence.</returns>
/// <exception cref="System.ArgumentNullException">Thrown when either of the input sequences is null.</exception>
[<CompiledName("AllPairs")>]
val allPairs: source1:seq<'T1> -> source2:seq<'T2> -> seq<'T1 * 'T2>
/// <summary>Wraps the two given enumerations as a single concatenated
/// enumeration.</summary>
///

Просмотреть файл

@ -2749,7 +2749,14 @@ and OptimizeLambdas (vspec: Val option) cenv env topValInfo e ety =
let valu =
match baseValOpt with
| None -> CurriedLambdaValue (lambdaId,arities,bsize,expr',ety)
| _ -> UnknownValue
| Some baseVal ->
let fvs = freeInExpr CollectLocals body'
if fvs.UsesMethodLocalConstructs || fvs.FreeLocals.Contains baseVal then
UnknownValue
else
let expr2 = mkMemberLambdas m tps ctorThisValOpt None vsl (body',bodyty)
CurriedLambdaValue (lambdaId,arities,bsize,expr2,ety)
expr', { TotalSize=bsize + (if isTopLevel then methodDefnTotalSize else closureTotalSize); (* estimate size of new syntactic closure - expensive, in contrast to a method *)
FunctionSize=1;

Просмотреть файл

@ -9128,11 +9128,13 @@ and TcMethodApplication
// Handle CallerSide optional arguments.
//
// CallerSide optional arguments are largely for COM interop, e.g. to PIA assemblies for Word etc.
// As a result we follow the VB spec here. To quote from an email exchange between the C# and VB teams.
// As a result we follow the VB and C# behavior here.
//
// "1. If the parameter is statically typed as System.Object and does not have a value, then there are two cases:
// a. The parameter may have the IDispatchConstantAttribute or IUnknownConstantAttribute attribute. If this is the case, the VB compiler then create an instance of the System.Runtime.InteropServices.DispatchWrapper /System.Runtime.InteropServices.UnknownWrapper type at the call site to wrap the value Nothing/null.
// b. If the parameter does not have those two attributes, we will emit Missing.Value.
// "1. If the parameter is statically typed as System.Object and does not have a value, then there are four cases:
// a. The parameter is marked with MarshalAs(IUnknown), MarshalAs(Interface), or MarshalAs(IDispatch). In this case we pass null.
// b. Else if the parameter is marked with IUnknownConstantAttribute. In this case we pass new System.Runtime.InteropServices.UnknownWrapper(null)
// c. Else if the parameter is marked with IDispatchConstantAttribute. In this case we pass new System.Runtime.InteropServices.DispatchWrapper(null)
// d. Else, we will pass Missing.Value.
// 2. Otherwise, if there is a value attribute, then emit the default value.
// 3. Otherwise, we emit default(T).
// 4. Finally, we apply conversions from the value to the parameter type. This is where the nullable conversions take place for VB.
@ -9174,7 +9176,7 @@ and TcMethodApplication
| Some assemblyRef ->
let tref = mkILNonGenericBoxedTy(mkILTyRef(assemblyRef, "System.Runtime.InteropServices.DispatchWrapper"))
let mref = mkILCtorMethSpecForTy(tref,[cenv.g.ilg.typ_Object]).MethodRef
let expr = Expr.Op(TOp.ILCall(false,false,false,false,CtorValUsedAsSuperInit,false,false,mref,[],[],[cenv.g.obj_ty]),[],[mkDefault(mMethExpr,currCalledArgTy)],mMethExpr)
let expr = Expr.Op(TOp.ILCall(false,false,false,true,NormalValUse,false,false,mref,[],[],[cenv.g.obj_ty]),[],[mkDefault(mMethExpr,currCalledArgTy)],mMethExpr)
emptyPreBinder,expr
| WrapperForIUnknown ->
match cenv.g.ilg.traits.SystemRuntimeInteropServicesScopeRef.Value with
@ -9182,7 +9184,7 @@ and TcMethodApplication
| Some assemblyRef ->
let tref = mkILNonGenericBoxedTy(mkILTyRef(assemblyRef, "System.Runtime.InteropServices.UnknownWrapper"))
let mref = mkILCtorMethSpecForTy(tref,[cenv.g.ilg.typ_Object]).MethodRef
let expr = Expr.Op(TOp.ILCall(false,false,false,false,CtorValUsedAsSuperInit,false,false,mref,[],[],[cenv.g.obj_ty]),[],[mkDefault(mMethExpr,currCalledArgTy)],mMethExpr)
let expr = Expr.Op(TOp.ILCall(false,false,false,true,NormalValUse,false,false,mref,[],[],[cenv.g.obj_ty]),[],[mkDefault(mMethExpr,currCalledArgTy)],mMethExpr)
emptyPreBinder,expr
| PassByRef (ty, dfltVal2) ->
let v,_ = mkCompGenLocal mMethExpr "defaultByrefArg" ty

Просмотреть файл

@ -504,9 +504,12 @@ type OptionalArgInfo =
let ty = destByrefTy g ty
PassByRef (ty, analyze ty)
elif isObjTy g ty then
if TryFindILAttributeOpt g.attrib_IDispatchConstantAttribute ilParam.CustomAttrs then WrapperForIDispatch
elif TryFindILAttributeOpt g.attrib_IUnknownConstantAttribute ilParam.CustomAttrs then WrapperForIUnknown
else MissingValue
match ilParam.Marshal with
| Some(ILNativeType.IUnknown | ILNativeType.IDispatch | ILNativeType.Interface) -> Constant(ILFieldInit.Null)
| _ ->
if TryFindILAttributeOpt g.attrib_IUnknownConstantAttribute ilParam.CustomAttrs then WrapperForIUnknown
elif TryFindILAttributeOpt g.attrib_IDispatchConstantAttribute ilParam.CustomAttrs then WrapperForIDispatch
else MissingValue
else
DefaultValue
CallerSide (analyze (ImportTypeFromMetadata amap m ilScope ilTypeInst [] ilParam.Type))

Просмотреть файл

@ -56,8 +56,8 @@ rem Disable strong-name validation for F# binaries built from open source that a
%SN32% -Vr FSharp.ProjectSystem.FSharp,b03f5f7f11d50a3a
%SN32% -Vr FSharp.ProjectSystem.PropertyPages,b03f5f7f11d50a3a
%SN32% -Vr FSharp.VS.FSI,b03f5f7f11d50a3a
%SN32% -Vr Unittests,b03f5f7f11d50a3a
%SN32% -Vr Salsa,b03f5f7f11d50a3a
%SN32% -Vr VisualFSharp.Unittests,b03f5f7f11d50a3a
%SN32% -Vr VisualFSharp.Salsa,b03f5f7f11d50a3a
if /i "%PROCESSOR_ARCHITECTURE%"=="AMD64" (
%SN64% -Vr FSharp.Core,b03f5f7f11d50a3a

Просмотреть файл

@ -48,8 +48,7 @@ if /I "%APPVEYOR_CI%" == "1" (
if /I not '%single_threaded%' == 'true' (set PARALLEL_ARG=-procs:%NUMBER_OF_PROCESSORS%) else set PARALLEL_ARG=-procs:0
rem This can be set to 1 to reduce the number of permutations used and avoid some of the extra-time-consuming tests
set REDUCED_RUNTIME=1
if "%REDUCED_RUNTIME%" == "1" (
if "%SKIP_EXPENSIVE_TESTS%" == "1" (
set NO_TTAGS_ARG=%NO_TTAGS_ARG%,Expensive
set NO_TTAGS=%NO_TTAGS%,Expensive
)
@ -186,7 +185,7 @@ set ERRORFILE=%RESULTSDIR%\FSharpNunit_Error.log
echo "%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
"%NUNIT3_CONSOLE%" --verbose "%FSCBINPATH%\..\..\net40\bin\FSharp.Tests.FSharp.dll" --framework:V4.0 %TTAGS_NUNIT_WHERE% --work:"%FSCBINPATH%" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --result:"%XMLFILE%;format=nunit2"
call :UPLOAD_XML "%XMLFILE%"
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
REM ----------------------------------------------------------------------------
@ -197,6 +196,9 @@ set OSARCH=%PROCESSOR_ARCHITECTURE%
set X86_PROGRAMFILES=%ProgramFiles%
if "%OSARCH%"=="AMD64" set X86_PROGRAMFILES=%ProgramFiles(x86)%
set SYSWOW64=.
if "%OSARCH%"=="AMD64" set SYSWOW64=SysWoW64
set REGEXE32BIT=reg.exe
if not "%OSARCH%"=="x86" set REGEXE32BIT=%WINDIR%\syswow64\reg.exe
@ -295,7 +297,7 @@ set ERRORFILE=%RESULTSDIR%\CoreUnit_%coreunitsuffix%_Error.log
echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll"
"%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%coreunitsuffix%\bin\FSharp.Core.Unittests.dll"
call :UPLOAD_XML "%XMLFILE%"
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
:COREUNITALL
@ -307,7 +309,7 @@ set ERRORFILE=%RESULTSDIR%\CoreUnit_all_Error.log
echo "%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\net40\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
"%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\net40\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
call :UPLOAD_XML "%XMLFILE%"
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
:COREUNITPORTABLE
@ -319,7 +321,7 @@ set ERRORFILE=%RESULTSDIR%\CoreUnit_Portable_Error.log
echo "%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
"%NUNIT3_CONSOLE%" /framework:V4.0 /result="%XMLFILE%;format=nunit2" /output="%OUTPUTFILE%" /err="%ERRORFILE%" /work="%FSCBINPATH%" "%FSCBINPATH%\..\..\portable7\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable47\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable78\bin\FSharp.Core.Unittests.dll" "%FSCBINPATH%\..\..\portable259\bin\FSharp.Core.Unittests.dll"
call :UPLOAD_XML "%XMLFILE%"
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
:COREUNIT_CORECLR
@ -335,6 +337,7 @@ set CORERUNPATH="%testbinpath%%flavor%%architecturepath%"
echo "%CORERUNPATH%\corerun.exe" "%testbinpath%%flavor%\coreclr\fsharp.core.unittests\FSharp.Core.Unittests.exe"
"%CORERUNPATH%\corerun.exe" "%testbinpath%%flavor%\coreclr\fsharp.core.unittests\FSharp.Core.Unittests.exe"
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
REM ----------------------------------------------------------------------------
@ -348,7 +351,7 @@ set ERRORFILE=%RESULTSDIR%\CompilerUnit_%compilerunitsuffix%_Error.log
echo "%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll"
"%NUNIT3_CONSOLE%" --verbose --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\..\..\%compilerunitsuffix%\bin\FSharp.Compiler.Unittests.dll"
call :UPLOAD_XML "%XMLFILE%"
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
REM ----------------------------------------------------------------------------
@ -360,30 +363,23 @@ set OUTPUTFILE=%RESULTSDIR%\IDEUnit_Output.log
set ERRORFILE=%RESULTSDIR%\IDEUnit_Error.log
pushd %FSCBINPATH%
echo "%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\VisualFSharp.Unittests.dll"
"%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" "%FSCBINPATH%\VisualFSharp.Unittests.dll"
echo "%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" --workers=1 --agents=1 --full "%FSCBINPATH%\VisualFSharp.Unittests.dll"
"%NUNIT3_CONSOLE%" --verbose --x86 --framework:V4.0 %TTAGS_NUNIT_WHERE% --result:"%XMLFILE%;format=nunit2" --output:"%OUTPUTFILE%" --err:"%ERRORFILE%" --work:"%FSCBINPATH%" --workers=1 --agents=1 --full "%FSCBINPATH%\VisualFSharp.Unittests.dll"
popd
call :UPLOAD_XML "%XMLFILE%"
goto :EOF
:UPLOAD_XML
rem See <http://www.appveyor.com/docs/environment-variables>
if not defined APPVEYOR goto :EOF
powershell -File Upload-Results.ps1 %RESULTSDIR%\%XMLFILE%
call :UPLOAD_TEST_RESULTS "%XMLFILE%" "%OUTPUTFILE%" "%ERRORFILE%"
goto :EOF
REM ----------------------------------------------------------------------------
:UPLOAD_XML
:UPLOAD_TEST_RESULTS
rem See <http://www.appveyor.com/docs/environment-variables>
if not defined APPVEYOR goto :EOF
set saved_errorlevel=%errorlevel%
echo Saved errorlevel %saved_errorlevel%
powershell -File Upload-Results.ps1 "%~1"
echo powershell -File Upload-Results.ps1 "%~1"
powershell -File Upload-Results.ps1 "%~1"
if NOT %saved_errorlevel% == 0 exit /b %saved_errorlevel%
goto :EOF

Просмотреть файл

@ -1489,9 +1489,9 @@ module TestTwoConversionsOK =
// asserted to be equal.
//
//This rule is a deliberate artificial limitation to reduce the complexity
// of type inference in the common case, at the cost of making “inline” code
// of type inference in the common case, at the cost of making “inline” code
// less generic. However, the rule should not apply to op_Explicit and op_Implicit constraints. These are special constraint names, known to the language, and we already have special rules around these operators to ensure that the return type
// is effectively considered to be part of the “name” of the constraint
// is effectively considered to be part of the “name” of the constraint
// (i.t. op_Explicit --> int64 is effectively a different constraint to op_Explicit --> int32).
//
//So the solution is thus to not apply the rule for these constraints.
@ -1701,6 +1701,24 @@ module RecordPropertyConstraintTests =
check "ckjwnewk" (f8()) (System.TimeSpan.FromSeconds 2.0) // after mutation
check "ckjwnewk" (f10()) "Gary"
// See https://github.com/Microsoft/visualfsharp/issues/740 - inlining on subtypes was not allowed
module InliningOnSubTypes1 =
type A() =
static member inline dosomething() = ()
type B() =
inherit A()
member inline this.SomethingElse a = a + 10
member inline this.SomethingElse2 a b = a + b + 10
let f () =
let b = B()
let x1 = b.SomethingElse 3
let x2 = b.SomethingElse2 3 4
(x1, x2)
do check "clkewlijwlkw" (f()) (13, 17)
// See https://github.com/Microsoft/visualfsharp/issues/238
module GenericPropertyConstraintSolvedByRecord =
@ -1716,4 +1734,4 @@ let aa =
do (stdout.WriteLine "Test Passed";
System.IO.File.WriteAllText("test.ok","ok");
exit 0)
exit 0)

Просмотреть файл

@ -43,8 +43,8 @@ if exist test2-hw.fsx (set sourceshw=%sourceshw% test2-hw.fsx)
rem to run the 64 bit version of the code set FSC_BASIC_64=FSC_BASIC_64
set PERMUTATIONS_LIST=FSI_FILE FSI_STDIN FSI_STDIN_OPT FSI_STDIN_GUI FSC_BASIC %FSC_BASIC_64% FSC_HW FSC_O3 GENERATED_SIGNATURE EMPTY_SIGNATURE EMPTY_SIGNATURE_OPT FSC_OPT_MINUS_DEBUG FSC_OPT_PLUS_DEBUG FRENCH SPANISH AS_DLL WRAPPER_NAMESPACE WRAPPER_NAMESPACE_OPT
if "%REDUCED_RUNTIME%"=="1" (
echo REDUCED_RUNTIME set
if "%SKIP_EXPENSIVE_TESTS%"=="1" (
echo SKIP_EXPENSIVE_TESTS set
if not defined PERMUTATIONS (
powershell.exe %PSH_FLAGS% -command "&{& '%~d0%~p0\PickPermutations.ps1' '%cd%' '%FSC%' '%PERMUTATIONS_LIST%'}" > _perm.txt

Просмотреть файл

@ -53,8 +53,8 @@ if exist test2-hw.fsx (set sourceshw=%sourceshw% test2-hw.fsx)
set PERMUTATIONS_LIST=FSI_FILE FSI_STDIN FSI_STDIN_OPT FSI_STDIN_GUI FSC_BASIC %FSC_BASIC_64% FSC_HW FSC_O3 GENERATED_SIGNATURE EMPTY_SIGNATURE EMPTY_SIGNATURE_OPT FSC_OPT_MINUS_DEBUG FSC_OPT_PLUS_DEBUG FRENCH SPANISH AS_DLL WRAPPER_NAMESPACE WRAPPER_NAMESPACE_OPT
if "%REDUCED_RUNTIME%"=="1" (
echo REDUCED_RUNTIME set
if "%SKIP_EXPENSIVE_TESTS%"=="1" (
echo SKIP_EXPENSIVE_TESTS set
if not defined PERMUTATIONS (
powershell.exe %PSH_FLAGS% -command "&{& '%~d0%~p0\PickPermutations.ps1' '%cd%' '%FSC%' '%PERMUTATIONS_LIST%'}" > _perm.txt

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,34 @@
open System
open WbemScripting
let doStuff() =
let locator =
let comTy = Type.GetTypeFromProgID("WbemScripting.SWbemLocator")
Activator.CreateInstance(comTy) :?> SWbemLocator
// SWBemLocator.ConnectServer https://msdn.microsoft.com/en-us/library/windows/desktop/aa393720(v=vs.85).aspx
// SWbemServices ConnectServer(
// [MarshalAs(UnmanagedType.BStr)] [In] string strServer = ".",
// [MarshalAs(UnmanagedType.BStr)] [In] string strNamespace = "",
// [MarshalAs(UnmanagedType.BStr)] [In] string strUser = "",
// [MarshalAs(UnmanagedType.BStr)] [In] string strPassword = "",
// [MarshalAs(UnmanagedType.BStr)] [In] string strLocale = "",
// [MarshalAs(UnmanagedType.BStr)] [In] string strAuthority = "",
// [In] int iSecurityFlags = 0,
// [IDispatchConstant] [MarshalAs(UnmanagedType.IDispatch)] [In] object objWbemNamedValueSet = null);
let services = locator.ConnectServer()
// SWbemServices.ExecQuery https://msdn.microsoft.com/en-us/library/windows/desktop/aa393866(v=vs.85).aspx
// SWbemObjectSet ExecQuery(
// [MarshalAs(UnmanagedType.BStr)] [In] string strQuery,
// [MarshalAs(UnmanagedType.BStr)] [In] string strQueryLanguage = "WQL",
// [In] int iFlags = 16,
// [IDispatchConstant] [MarshalAs(UnmanagedType.IDispatch)] [In] object objWbemNamedValueSet = null);
let resultSet = services.ExecQuery("select * from Win32_Processor")
resultSet
|> Seq.cast<SWbemObject>
|> Seq.map (fun o -> o.GetObjectText_(0))
|> Seq.iter (printfn "%s")
doStuff()

Просмотреть файл

@ -5,6 +5,7 @@
SOURCE=E_SanityCheck02.fs
SOURCE=SanityCheck03.fs
SOURCE=OptArgsFromCOM.fs SCFLAGS="-r:WbemScripting.dll" PRECMD="tlbimp %SystemRoot%\\%SYSWOW64%\\wbem\\wbemdisp.tlb" # OptArgsFromCOM.fs
SOURCE=NullOptArgsFromVB.fs SCFLAGS="-r:TestLibVB.dll" PRECMD="\$VBC_PIPE /t:library TestLibVB.vb" # NullOptArgsFromVB.fs
SOURCE=NullOptArgsFromCS.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # NullOptArgsFromCS.fs
SOURCE=SanityOptArgsFromCS.fs SCFLAGS="-r:TestLib.dll" PRECMD="\$CSC_PIPE /t:library TestLib.cs" # SanityOptArgsFromCS.fs

Просмотреть файл

@ -1,5 +1,5 @@
SOURCE=Backslash01.fs # Backslash01.fs
NO_CI SOURCE=Backslash02.fs # Backslash02.fs
SOURCE=Backslash02.fs # Backslash02.fs
SOURCE=ByteChars01.fs # ByteChars01.fs
SOURCE=ByteChars02.fs SCFLAGS="--codepage:1252" # ByteChars02.fs
@ -7,7 +7,7 @@ NO_CI SOURCE=Backslash02.fs # Backslash02.fs
SOURCE=ByteString01.fs # ByteString01.fs
SOURCE=ByteString02.fs # ByteString02.fs
NO_CI SOURCE=ByteString03.fs # ByteString03.fs
SOURCE=ByteString03.fs # ByteString03.fs
SOURCE=VerbatimString01.fs # VerbatimString01.fs
@ -29,7 +29,7 @@ NO_CI SOURCE=ByteString03.fs # ByteString03.fs
SOURCE=UnicodeString03.fs # UnicodeString03.fs
SOURCE=TripleQuote.fs # TripleQuote.fs
NO_CI SOURCE=TripleQuoteString01.fs # TripleQuoteString01.fs
SOURCE=TripleQuoteString01.fs # TripleQuoteString01.fs
SOURCE=TripleQuoteString02.fs # TripleQuoteString02.fs
NoMT SOURCE=TripleQuoteStringInFSI01.fsx FSIMODE=PIPE COMPILE_ONLY=1 # TripleQuoteStringInFSI01.fsx
NO_CI,NoMT SOURCE=TripleQuoteStringInFSI02.fsx FSIMODE=FEED COMPILE_ONLY=1 # TripleQuoteStringInFSI02.fsx
NoMT SOURCE=TripleQuoteStringInFSI02.fsx FSIMODE=FEED COMPILE_ONLY=1 # TripleQuoteStringInFSI02.fsx

Просмотреть файл

@ -25,23 +25,29 @@ module Helpers =
run compilerPath ["-o:consumer.exe"; "--noframework"; sprintf "\"-r:%s\"" runtime; "-r:author.dll"; source]
let private consumerRunFsi fsiPath source =
let localFSharpCore = Path.Combine(Environment.CurrentDirectory, "FSharp.Core.dll")
if File.Exists(localFSharpCore) then
File.Delete(localFSharpCore)
run fsiPath ["--exec"; source]
// runs the consumer EXE, handling binding redirects automatically
let private consumerRunExe redirectVer =
if File.Exists("consumer.exe.config") then
File.Delete("consumer.exe.config")
let content = File.ReadAllText("consumer.exe.config.txt").Replace("{ver}", redirectVer)
File.WriteAllText("consumer.exe.config", content)
run "consumer.exe" []
/// gets the version of the assembly at the specified path
let getVer dllPath =
let asm = Assembly.ReflectionOnlyLoadFrom(dllPath)
asm.GetName().Version.ToString()
// runs the consumer EXE, handling binding redirects automatically
let private consumerRunExe consumerRuntime =
if File.Exists("consumer.exe.config") then
File.Delete("consumer.exe.config")
let redirectVer = getVer consumerRuntime
let content = File.ReadAllText("consumer.exe.config.txt").Replace("{ver}", redirectVer)
File.WriteAllText("consumer.exe.config", content)
File.Copy(consumerRuntime, Path.Combine(Environment.CurrentDirectory, "FSharp.Core.dll"), true)
run "consumer.exe" []
/// runs through the end-to-end scenario of
/// - Author uses [authorComiler] to build DLL targeting [authorRuntime] with source [authorSource]
/// - Consumer uses [consumerCompiler] to build EXE ref'ing above DLL, building EXE targeting [consumerRuntime] with source [consumerSource]
@ -49,7 +55,7 @@ module Helpers =
let testExe authorCompiler authorRuntime consumerCompiler consumerRuntime authorSource consumerSource =
authorCompile authorCompiler authorRuntime authorSource
consumerCompile consumerCompiler consumerRuntime consumerSource
consumerRunExe (getVer consumerRuntime)
consumerRunExe consumerRuntime
/// runs through the end-to-end scenario of
/// - Author uses [authorComiler] to build DLL targeting [authorRuntime] with source [authorSource]

Просмотреть файл

@ -1,10 +1,10 @@
NOMONO,NOOPEN SOURCE=E_MissingReferenceToFSharpCore20.fs SCFLAGS="--noframework -r %WINDIR%\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll" # E_MissingReferenceToFSharpCore20.fs
NOMONO SOURCE=E_MissingReferenceToFSharpCore20.fs SCFLAGS="--noframework -r %WINDIR%\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll" # E_MissingReferenceToFSharpCore20.fs
NOMONO SOURCE=E_BadPathToFSharpCore.fs SCFLAGS="--noframework -r %WINDIR%\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll -r I_DO_NOT_EXIST\\FSharp.Core.dll" # E_BadPathToFSharpCore.fs
NOMONO SOURCE=E_BadPathToFSharpCore.fsx SCFLAGS="--noframework -r %WINDIR%\\Microsoft.NET\\Framework\\v4.0.30319\\mscorlib.dll -r I_DO_NOT_EXIST\\FSharp.Core.dll" # E_BadPathToFSharpCore.fsx
# FSharp.Core is checked in for this test to verify a particular error message related to it. It shouldn't be accidentally picked up by other tests since it isn't in the working directory for them
NOMONO SOURCE=E_UseBinaryIncompatibleLibrary.fs SCFLAGS="--noframework -r ..\\Common\\FSharp.Core.dll" # E_UseBinaryIncompatibleLibrary.fs
ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx QuotedCommaTypeName_author.fs QuotedCommaTypeName_consumer.fsx 0,8" # QuotedCommaTypeName
ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx QuotedCommaTypeName_author.fs QuotedCommaTypeName_consumer.fsx" # QuotedCommaTypeName
ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx InlineCoreResource_author.fs InlineCoreResource_consumer.fsx" # InlineCoreResource
ReqOpen SOURCE=dummy.fs POSTCMD="\$FSI_PIPE --nologo --quiet --exec .\\MultiTargetMatrix.fsx OptimizedForLoops_author.fs OptimizedForLoops_consumer.fsx" # OptimizedForLoops

Просмотреть файл

@ -40,14 +40,14 @@ Core03,coreclr fsharp\core\lazy
Core03 fsharp\core\letrec
Core03, fsharp\core\libtest
Core03 fsharp\core\lift
NO_CI,Core03 fsharp\core\load-script
Core03 fsharp\core\load-script
Core03 fsharp\core\longnames
Core03,coreclr fsharp\core\map
Core04 ..\testsprivate\fsharp\core\math\lapack
Core04,coreclr fsharp\core\math\numbers
Core04,coreclr fsharp\core\math\numbersVS2008
Core04 fsharp\core\measures
NO_CI,Core04 fsharp\core\members\basics
Core04 fsharp\core\members\basics
Core04,coreclr fsharp\core\members\ctree
Core04,coreclr fsharp\core\members\factors
Core04 fsharp\core\members\incremental
@ -157,7 +157,7 @@ TypeProviders01 fsharp\typeProviders\builtin\WsdlService
TypeProviders01 fsharp\typeProviders\diamondAssembly
TypeProviders01 fsharp\typeProviders\globalNamespace
TypeProviders01 fsharp\typeProviders\helloWorldCSharp
NO_CI,TypeProviders01,TypeProvidersNeg fsharp\typeProviders\negTests
TypeProviders01,TypeProvidersNeg fsharp\typeProviders\negTests
TypeProviders01 fsharp\typeProviders\splitAssembly
TypeProviders01 fsharp\typeProviders\wedgeAssembly

Просмотреть файл

@ -27,12 +27,13 @@ type internal FSharpMethodListForAMethodTip(documentationBuilder: IDocumentation
// Compute the tuple end points
let tupleEnds =
let oneColAfter ((l,c): Pos01) = (l,c+1)
let oneColBefore ((l,c): Pos01) = (l,c-1)
[| yield Pos.toZ nwpl.LongIdStartLocation
yield Pos.toZ nwpl.LongIdEndLocation
yield Pos.toZ nwpl.OpenParenLocation
yield oneColAfter (Pos.toZ nwpl.OpenParenLocation)
for i in 0..nwpl.TupleEndLocations.Length-2 do
yield oneColBefore (Pos.toZ nwpl.TupleEndLocations.[i])
yield Pos.toZ nwpl.TupleEndLocations.[i]
let last = Pos.toZ nwpl.TupleEndLocations.[nwpl.TupleEndLocations.Length-1]
yield if nwpl.IsThereACloseParen then oneColBefore last else last |]
@ -261,7 +262,7 @@ type internal FSharpIntellisenseInfo
// If the name is an operator ending with ">" then it is a mistake
// we can't tell whether " >(" is a generic method call or an operator use
// (it depends on the previous line), so we fitler it
// (it depends on the previous line), so we filter it
//
// Note: this test isn't particularly elegant - encoded operator name would be something like "( ...> )"
if (methods.Methods.Length = 0 || methods.MethodName.EndsWith("> )")) then

Просмотреть файл

@ -59,16 +59,10 @@ module internal Locals =
/// Given a list of (key,value)
/// Chunk into (key,values) where the values are keys of (key,value) with the same key.
/// Complexity: this code is linear in (length kxs).
let rec chunkKeyValues kxs =
let rec loop kxs acc =
match kxs with
| [] -> List.rev acc
| (key, v)::rest -> accumulate key [v] rest acc
and accumulate k chunk rest acc =
match rest with
| (key, v)::rest when equal key k -> accumulate k (v::chunk) rest acc
| rest -> loop rest ((k, (List.rev chunk))::acc)
loop kxs []
let chunkKeyValues allEntries =
allEntries
|> List.groupBy(fun (responseType, line) -> responseType)
|> List.map(fun (responseType, entries) -> (responseType, entries |> List.map(fun (_, line) -> line)))
open Util

Просмотреть файл

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<!-- Configurations that affect the Test Framework -->
<RunConfiguration>
<MaxCpuCount>1</MaxCpuCount>
</RunConfiguration>
</RunSettings>

Просмотреть файл

@ -648,7 +648,6 @@ type UsingMSBuild() =
//ColorizerTest start
[<Test>]
[<Category("PerfCheck")>]
member public this.``Regression.Bug2986``() =
let code =
[

Просмотреть файл

@ -1941,7 +1941,6 @@ let x = new MyClass2(0)
[]
[<Test>]
[<Category("PerfCheck")>]
member public this.``Project.FsFileWithBuildAction``() =
AssertAutoCompleteContainsNoCoffeeBreak
["let i = 4"
@ -2337,7 +2336,7 @@ let x = new MyClass2(0)
[<Test>]
/// This is the case where at (*TYPING*) we first type 1...N-1 characters of the target custom operation and then invoke the completion list, and we check that the completion list contains the custom operation
[<Category("QueryExpressions")>]
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
member this.``QueryExpression.CtrlSpaceSystematic1``() =
let rec strictPrefixes (s:string) = seq { if s.Length > 1 then let s = s.[0..s.Length-2] in yield s; yield! strictPrefixes s}
for customOperation in ["select";"skip";"contains";"groupJoin"] do
@ -2420,7 +2419,7 @@ let x = new MyClass2(0)
[<Test>]
[<Category("QueryExpressions")>]
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
member this.``QueryExpressions.QueryAndSequenceExpressionWithForYieldLoopSystematic``() =
let prefix = """
@ -2482,7 +2481,7 @@ let aaaaaa = [| "1" |]
[<Test>]
[<Category("QueryExpressions")>]
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
/// Incrementally enter a seq{ .. while ...} loop and check for availability of intellisense etc.
member this.``SequenceExpressions.SequenceExprWithWhileLoopSystematic``() =
@ -2523,7 +2522,7 @@ let aaaaaa = 0
[<Test>]
[<Category("QueryExpressions")>]
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
/// Incrementally enter query with a 'join' and check for availability of quick info, auto completion and dot completion
member this.``QueryAndOtherExpressions.WordByWordSystematicJoinQueryOnSingleLine``() =
@ -2582,7 +2581,7 @@ let aaaaaa = 0
[<Test>]
/// This is a sanity check that the multiple-line case is much the same as the single-line cae
[<Category("QueryExpressions")>]
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
member this.``QueryAndOtherExpressions.WordByWordSystematicJoinQueryOnMultipleLine``() =
let prefix = """
@ -3656,7 +3655,6 @@ let x = query { for bbbb in abbbbc(*D0*) do
[ ] // should not contain
[<Test>]
[<Category("PerfCheck")>]
member public this.``Expressions.Computation``() =
AssertAutoCompleteContains
[
@ -4179,7 +4177,6 @@ let x = query { for bbbb in abbbbc(*D0*) do
// FEATURE: Saving file N does not cause files 1 to N-1 to re-typecheck (but does cause files N to <end> to
[<Test>]
[<Category("PerfCheck")>]
member public this.``Performance.Bug5774``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -4290,7 +4287,6 @@ let x = query { for bbbb in abbbbc(*D0*) do
/// FEATURE: The filename on disk and the filename in the project can differ in case.
[<Test>]
[<Category("PerfCheck")>]
member this.``Filenames.MayBeDifferentlyCased``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -4312,7 +4308,6 @@ let x = query { for bbbb in abbbbc(*D0*) do
/// In this bug, a bogus flag caused the rest of flag parsing to be ignored.
[<Test>]
[<Category("PerfCheck")>]
member public this.``FlagsAndSettings.Bug1969``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -6557,7 +6552,7 @@ let rec f l =
// Regression test for 1067 -- Completion lists don't work after generic arguments - for generic functions and for static members of generic types
[<Test>]
member this.``Regression1067.InstanceOfGeniricType``() =
member this.``Regression1067.InstanceOfGenericType``() =
this.VerifyDotCompListContainAllAtStartOfMarker(
fileContents = """
type GT<'a> =

Просмотреть файл

@ -294,7 +294,7 @@ b.Do(1, 1)
Assert.AreEqual(1, List.length errors)
assertContains errors "A unique overload for method 'Do' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: member A.Do : a:int * b:'T -> unit, member A.Do : a:int * b:int -> unit"
[<Test>]
[<Test; Category("Expensive")>]
member public this.``NoErrorInErrList``() =
use _guard = this.UsingNewVS()
let fileContents1 = """
@ -328,7 +328,7 @@ b.Do(1, 1)
TakeCoffeeBreak(this.VS)
this.VerifyCountAtSpecifiedFile(project,0)
[<Test>]
[<Test; Category("Expensive")>]
member public this.``NoLevel4Warning``() =
use _guard = this.UsingNewVS()
let fileContents = """
@ -557,7 +557,6 @@ but here has type
// In this bug, particular warns were still present after nowarn
[<Test>]
[<Category("PerfCheck")>]
member public this.``NoWarn.Bug5424``() =
let fileContent = """
#nowarn "67" // this type test or downcast will always hold

Просмотреть файл

@ -55,7 +55,6 @@ type UsingMSBuild() =
[<Test>]
[<Category("error_recovery")>]
[<Category("PerfCheck")>]
member public this.``ErrorRecovery.Bug4881_1``() =
let code =
["let s = \"\""

Просмотреть файл

@ -46,7 +46,6 @@ type UsingMSBuild() =
()
[<Test>]
[<Category("PerfCheck")>]
member public this.``NoKeyword.Negative`` () =
let file =
[ "let s = \"System.Con$sole\""

Просмотреть файл

@ -284,7 +284,6 @@ EdmxFile
/// FEATURE: (Project System only) Adding a file outside the project directory creates a link
[<Test>]
[<Category("PerfCheck")>]
member public this.``ProjectSystem.FilesOutsideProjectDirectoryBecomeLinkedFiles``() =
use _guard = this.UsingNewVS()
if OutOfConeFilesAreAddedAsLinks(this.VS) then
@ -300,7 +299,6 @@ EdmxFile
AssertMatchesRegex '<' @"<ItemGroup>\s*<Compile Include=""..\\link.fs"">\s*<Link>link.fs</Link>" projFileText
[<Test>]
[<Category("PerfCheck")>]
member public this.``Lexer.CommentsLexing.Bug1548``() =
let scan = new FSharpScanner(fun source ->
let filename = "test.fs"
@ -399,7 +397,6 @@ EdmxFile
// Make sure that possible overloads (and other related errors) are shown in the error list
[<Test>]
[<Category("PerfCheck")>]
member public this.``ErrorLogging.Bug5144``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -422,8 +419,7 @@ EdmxFile
Helper.AssertListContainsInOrder(GetOutputWindowPaneLines(this.VS),
["error FS0041: A unique overload for method 'Plot' could not be determined based on type information prior to this program point. A type annotation may be needed. Candidates: member N.M.LineChart.Plot : f:(float -> float) * xmin:float * xmax:float -> unit, member N.M.LineChart.Plot : f:System.Func<double,double> * xmin:float * xmax:float -> unit"])
[<Category("TakesMoreThanFifteenSeconds")>]
[<Test>]
[<Test; Category("Expensive")>]
member public this.``ExhaustivelyScrutinize.ThisOnceAsserted``() =
Helper.ExhaustivelyScrutinize(
this.TestRunner,
@ -433,8 +429,7 @@ EdmxFile
""" else [],"" """ ]
)
[<Category("TakesMoreThanFifteenSeconds")>]
[<Test>]
[<Test; Category("Expensive")>]
member public this.``ExhaustivelyScrutinize.ThisOnceAssertedToo``() =
Helper.ExhaustivelyScrutinize(
this.TestRunner,
@ -443,8 +438,8 @@ EdmxFile
" interface System.IComparable with "
" member __.CompareTo(v:obj) = 1" ]
)
[<Category("TakesMoreThanFifteenSeconds")>]
[<Test>]
[<Test; Category("Expensive")>]
member public this.``ExhaustivelyScrutinize.ThisOnceAssertedThree``() =
Helper.ExhaustivelyScrutinize(
this.TestRunner,
@ -466,7 +461,7 @@ EdmxFile
member public this.``ExhaustivelyScrutinize.ThisOnceAssertedFive``() =
Helper.ExhaustivelyScrutinize(this.TestRunner, [ """CSV.File<@"File1.txt">.[0].""" ]) // <@ is one token, wanted < @"...
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
[<Test>]
member public this.``ExhaustivelyScrutinize.Bug2277``() =
Helper.ExhaustivelyScrutinize(
@ -481,7 +476,7 @@ EdmxFile
"let pp= plot(Area(xs,ys))" ]
)
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
[<Test>]
member public this.``ExhaustivelyScrutinize.Bug2283``() =
Helper.ExhaustivelyScrutinize(

Просмотреть файл

@ -909,7 +909,6 @@ type UsingMSBuild() =
/// let #x = () in $x
[<Test>]
[<Category("PerfCheck")>]
member public this.``GotoDefinition.InsideClass.Bug3176`` () =
this.GotoDefinitionTestWithSimpleFile "id77 (*loc-77*)" (Some("val id77 (*loc-77*) : int", "id77"))
@ -1358,7 +1357,6 @@ type UsingMSBuild() =
Assert.Fail("Expected result, but didn't receive one!")
[<Test>]
[<Category("PerfCheck")>]
member public this.``GetCompleteIdTest.TrivialBefore`` () =
for tolerate in [true;false] do
this.GetCompleteIdTest tolerate "let $ThisIsAnIdentifier = ()" (Some "ThisIsAnIdentifier")

Просмотреть файл

@ -42,7 +42,7 @@ type IncrementalBuild() =
// It verifies that incremental builder can handle changes to timestamps that happen _before_ the
// stamp function exists. This ensures there's not a race in the data gathered for tracking file
// timestamps in parsing.
[<Test>]
[<Test; Category("Expensive")>]
member public rb.StampUpdate() =
let path = Path.GetTempFileName()

Просмотреть файл

@ -159,7 +159,6 @@ type UsingMSBuild() =
"SomeModule", "(*5e*)" (* entire module *) ]
[<Test>]
[<Category("PerfCheck")>]
member public this.``Record1``() =
this.TestNavigationBar NavigationFile1 "SomeModule.Rec" ["RFirst"; "RSecond"]

Просмотреть файл

@ -140,7 +140,6 @@ type UsingMSBuild() =
failwith "Expected parameter info to contain AsyncRead"
[<Test>]
[<Category("PerfCheck")>]
member public this.``Regression.MethodInfo.WithColon.Bug4518_1``() =
let fileContent = """
type T() =
@ -880,7 +879,7 @@ type UsingMSBuild() =
let info = info.Value
AssertEqual("f1", info.GetName(0))
// note about (5,0): service.fs adds three lines of empty text to the end of every file, so it reports the location of 'end of file' as first the char, 3 lines past the last line of the file
AssertEqual([|(2,10);(2,12);(2,12);(5,0)|], info.GetNoteworthyParamInfoLocations())
AssertEqual([|(2,10);(2,12);(2,13);(5,0)|], info.GetNoteworthyParamInfoLocations())
[<Test>]
member this.``LocationOfParams.AfterQuicklyTyping.CallConstructor``() =
@ -902,7 +901,7 @@ type UsingMSBuild() =
let info = info.Value
AssertEqual("Foo", info.GetName(0))
// note about (4,0): service.fs adds three lines of empty text to the end of every file, so it reports the location of 'end of file' as first the char, 3 lines past the last line of the file
AssertEqual([|(1,14);(1,17);(1,17);(4,0)|], info.GetNoteworthyParamInfoLocations())
AssertEqual([|(1,14);(1,17);(1,18);(4,0)|], info.GetNoteworthyParamInfoLocations())
(*
@ -1002,23 +1001,23 @@ We really need to rewrite some code paths here to use the real parse tree rather
[<Test>]
member public this.``LocationOfParams.Case1``() =
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^^("hel$lo"^)""")
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^(^"hel$lo"^)""")
[<Test>]
member public this.``LocationOfParams.Case2``() =
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^ ^( "hel$lo {0}" ^, "Brian" ^)""")
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^ (^ "hel$lo {0}" ,^ "Brian" ^)""")
[<Test>]
member public this.``LocationOfParams.Case3``() =
this.TestParameterInfoLocationOfParams(
"""^System.Console.WriteLine^
^(
"hel$lo {0}" ^,
(^
"hel$lo {0}" ,^
"Brian" ^) """)
[<Test>]
member public this.``LocationOfParams.Case4``() =
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^ ^( "hello {0}" ^, ("tuples","don't $ confuse it") ^)""")
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^ (^ "hello {0}" ,^ ("tuples","don't $ confuse it") ^)""")
[<Test>]
member public this.``ParameterInfo.LocationOfParams.Bug112688``() =
@ -1049,14 +1048,14 @@ We really need to rewrite some code paths here to use the real parse tree rather
[<Test>]
member public this.``Regression.LocationOfParams.Bug91479``() =
this.TestParameterInfoLocationOfParams("""let z = fun x -> x + ^System.Int16.Parse^^($ """, markAtEOF=true)
this.TestParameterInfoLocationOfParams("""let z = fun x -> x + ^System.Int16.Parse^(^$ """, markAtEOF=true)
[<Test>]
member public this.``LocationOfParams.Attributes.Bug230393``() =
this.TestParameterInfoLocationOfParams("""
let paramTest((strA : string),(strB : string)) =
strA + strB
^paramTest^^( $
^paramTest^(^ $
[<^Measure>]
type RMB
@ -1065,32 +1064,32 @@ We really need to rewrite some code paths here to use the real parse tree rather
[<Test>]
member public this.``LocationOfParams.InfixOperators.Case1``() =
// infix operators like '+' do not give their own param info
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^^("" + "$"^)""")
this.TestParameterInfoLocationOfParams("""^System.Console.WriteLine^(^"" + "$"^)""")
[<Test>]
member public this.``LocationOfParams.InfixOperators.Case2``() =
// infix operators like '+' do give param info when used as prefix ops
this.TestParameterInfoLocationOfParams("""System.Console.WriteLine((^+^)^($3^)(4))""")
this.TestParameterInfoLocationOfParams("""System.Console.WriteLine((^+^)(^$3^)(4))""")
[<Test>]
member public this.``LocationOfParams.GenericMethodExplicitTypeArgs()``() =
this.TestParameterInfoLocationOfParams("""
type T<'a> =
static member M(x:int, y:string) = x + y.Length
let x = ^T<int>.M^^(1^, $"test"^) """)
let x = ^T<int>.M^(^1,^ $"test"^) """)
[<Test>]
member public this.``LocationOfParams.InsideAMemberOfAType``() =
this.TestParameterInfoLocationOfParams("""
type Widget(z) =
member x.a = (1 <> ^System.Int32.Parse^^("$"^)) """)
member x.a = (1 <> ^System.Int32.Parse^(^"$"^)) """)
[<Test>]
member public this.``LocationOfParams.InsidePropertyGettersAndSetters.Case1``() =
this.TestParameterInfoLocationOfParams("""
type Widget(z) =
member x.P1
with get() = ^System.Int32.Parse^^("$"^)
with get() = ^System.Int32.Parse^(^"$"^)
and set(z) = System.Int32.Parse("") |> ignore
member x.P2 with get() = System.Int32.Parse("")
member x.P2 with set(z) = System.Int32.Parse("") |> ignore """)
@ -1101,7 +1100,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
type Widget(z) =
member x.P1
with get() = System.Int32.Parse("")
and set(z) = ^System.Int32.Parse^^("$"^) |> ignore
and set(z) = ^System.Int32.Parse^(^"$"^) |> ignore
member x.P2 with get() = System.Int32.Parse("")
member x.P2 with set(z) = System.Int32.Parse("") |> ignore """)
@ -1112,7 +1111,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member x.P1
with get() = System.Int32.Parse("")
and set(z) = System.Int32.Parse("") |> ignore
member x.P2 with get() = ^System.Int32.Parse^^("$"^)
member x.P2 with get() = ^System.Int32.Parse^(^"$"^)
member x.P2 with set(z) = System.Int32.Parse("") |> ignore """)
[<Test>]
@ -1123,46 +1122,46 @@ We really need to rewrite some code paths here to use the real parse tree rather
with get() = System.Int32.Parse("")
and set(z) = System.Int32.Parse("") |> ignore
member x.P2 with get() = System.Int32.Parse("")
member x.P2 with set(z) = ^System.Int32.Parse^^("$"^) |> ignore """)
member x.P2 with set(z) = ^System.Int32.Parse^(^"$"^) |> ignore """)
[<Test>]
member public this.``LocationOfParams.InsideObjectExpression``() =
this.TestParameterInfoLocationOfParams("""
let _ = { new ^System.Object^^($^) with member __.GetHashCode() = 2}""")
let _ = { new ^System.Object^(^$^) with member __.GetHashCode() = 2}""")
[<Test>]
member public this.``LocationOfParams.Nested1``() =
this.TestParameterInfoLocationOfParams("""System.Console.WriteLine("hello {0}" , ^sin^ ^(4$2.0 ^) )""")
this.TestParameterInfoLocationOfParams("""System.Console.WriteLine("hello {0}" , ^sin^ (^4$2.0 ^) )""")
[<Test>]
member public this.``LocationOfParams.MatchGuard``() =
this.TestParameterInfoLocationOfParams("""match [1] with | [x] when ^box^^($x^) <> null -> ()""")
this.TestParameterInfoLocationOfParams("""match [1] with | [x] when ^box^(^$x^) <> null -> ()""")
[<Test>]
member public this.``LocationOfParams.Nested2``() =
this.TestParameterInfoLocationOfParams("""System.Console.WriteLine("hello {0}" , ^sin^ ^4$2.0^ )""")
this.TestParameterInfoLocationOfParams("""System.Console.WriteLine("hello {0}" , ^sin^ 4^$2.0^ )""")
[<Test>]
member public this.``LocationOfParams.Generics1``() =
this.TestParameterInfoLocationOfParams("""
let f<'T,'U>(x:'T, y:'U) = (y,x)
let r = ^f^<int,string>^(4$2^,""^)""")
let r = ^f^<int,string>(^4$2,^""^)""")
[<Test>]
member public this.``LocationOfParams.Generics2``() =
this.TestParameterInfoLocationOfParams("""let x = ^System.Collections.Generic.Dictionary^<int,int>^(42^,n$ull^)""")
this.TestParameterInfoLocationOfParams("""let x = ^System.Collections.Generic.Dictionary^<int,int>(^42,^n$ull^)""")
[<Test>]
member public this.``LocationOfParams.Unions1``() =
this.TestParameterInfoLocationOfParams("""
type MyDU =
| FOO of int * string
let r = ^FOO^^(42^,"$"^) """)
let r = ^FOO^(^42,^"$"^) """)
[<Test>]
member public this.``LocationOfParams.EvenWhenOverloadResolutionFails.Case1``() =
this.TestParameterInfoLocationOfParams("""let a = new ^System.IO.FileStream^^($^)""")
this.TestParameterInfoLocationOfParams("""let a = new ^System.IO.FileStream^(^$^)""")
[<Test>]
member public this.``LocationOfParams.EvenWhenOverloadResolutionFails.Case2``() =
@ -1170,7 +1169,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
open System.Collections.Generic
open System.Linq
let l = List<int>([||])
^l.Aggregate^^($^) // was once a bug""")
^l.Aggregate^(^$^) // was once a bug""")
[<Test>]
member public this.``LocationOfParams.BY_DESIGN.WayThatMismatchedParensFailOver.Case1``() =
@ -1180,7 +1179,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
type CC() =
member this.M(a,b,c,d) = a+b+c+d
let c = new CC()
^c.M^^(1^,2^,3^, $
^c.M^(^1,^2,^3,^ $
c.M(1,2,3,4)""", markAtEOF=true)
[<Test>]
@ -1201,7 +1200,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
type CC() =
member this.M(a,b,c,d) = a+b+c+d
let c = new CC()
^c.M^^(1,2,3, $
^c.M^(^1,2,3, $
c.M(1,2,3,4)
c.M(1,2,3,4)
c.M(1,2,3,4)""", markAtEOF=true)
@ -1209,12 +1208,12 @@ We really need to rewrite some code paths here to use the real parse tree rather
[<Test>]
member public this.``LocationOfParams.Tuples.Bug91360.Case1``() =
this.TestParameterInfoLocationOfParams("""
^System.Console.WriteLine^^( (4$2,43) ^) // oops""")
^System.Console.WriteLine^(^ (4$2,43) ^) // oops""")
[<Test>]
member public this.``LocationOfParams.Tuples.Bug91360.Case2``() =
this.TestParameterInfoLocationOfParams("""
^System.Console.WriteLine^^( $(42,43) ^) // oops""")
^System.Console.WriteLine^(^ $(42,43) ^) // oops""")
[<Test>]
member public this.``LocationOfParams.Tuples.Bug123219``() =
@ -1224,20 +1223,20 @@ We really need to rewrite some code paths here to use the real parse tree rather
member this.M1(a:int*string, b:'a -> unit) = ()
let x = new T<Expr>()
^x.M1^^((1,$ """, markAtEOF=true)
^x.M1^(^(1,$ """, markAtEOF=true)
[<Test>]
member public this.``LocationOfParams.UnmatchedParens.Bug91609.OtherCases.Open``() =
this.TestParameterInfoLocationOfParams("""
let arr = Array.create 4 1
arr.[1] <- ^System.Int32.Parse^^($
arr.[1] <- ^System.Int32.Parse^(^$
open^ System""")
[<Test>]
member public this.``LocationOfParams.UnmatchedParens.Bug91609.OtherCases.Module``() =
this.TestParameterInfoLocationOfParams("""
let arr = Array.create 4 1
arr.[1] <- ^System.Int32.Parse^^($
arr.[1] <- ^System.Int32.Parse^(^$
^module Foo =
let x = 42""")
@ -1247,14 +1246,14 @@ We really need to rewrite some code paths here to use the real parse tree rather
namespace Foo
module Bar =
let arr = Array.create 4 1
arr.[1] <- ^System.Int32.Parse^^($
arr.[1] <- ^System.Int32.Parse^(^$
namespace^ Other""")
[<Test>]
member public this.``LocationOfParams.UnmatchedParens.Bug91609.Ok``() =
this.TestParameterInfoLocationOfParams("""
let arr = Array.create 4 1
arr.[1] <- ^System.Int32.Parse^^($
arr.[1] <- ^System.Int32.Parse^(^$
let squares3 = ()
^type Expr = class end
let rec Evaluate (env:Map<string,int>) exp = ()""")
@ -1263,7 +1262,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParens.Bug91609.AlsoOk``() =
this.TestParameterInfoLocationOfParams("""
let arr = Array.create 4 1
arr.[1] <- System.Int32.Parse(int(int(int(^int^^($
arr.[1] <- System.Int32.Parse(int(int(int(^int^(^$
let squares3 = ()
^type Expr = class end
let rec Evaluate (env:Map<string,int>) exp = ()""")
@ -1274,7 +1273,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
// However now that we recover from more kinds of tokens, e.g. OBLOCKEND, we can easily go much much deeper, and so this case (and most practical cases) now succeeds.
this.TestParameterInfoLocationOfParams("""
let arr = Array.create 4 1
arr.[1] <- System.Int32.Parse(int(int(int(int(int(int(^int^^($
arr.[1] <- System.Int32.Parse(int(int(int(int(int(int(^int^(^$
let squares3 = ()
^type Expr = class end
let rec Evaluate (env:Map<string,int>) exp = ()""")
@ -1283,7 +1282,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParens.Bug150492.Case1``() =
this.TestParameterInfoLocationOfParams("""
module Inner =
^System.Console.Write^^($
^System.Console.Write^(^$
let y = 4
^type Foo() = inherit obj()
[<assembly:System.Security.AllowPartiallyTrustedCallersAttribute>]
@ -1294,7 +1293,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
// like previous test, but with explicit begin-end at module
this.TestParameterInfoLocationOfParams("""
module Inner = begin
^System.Console.Write^^($
^System.Console.Write^(^$
let y = 4
^end
type Foo() = inherit obj()
@ -1308,7 +1307,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
let xxx = 42
type FooBaz() = class end
module Inner =
^System.Console.Write^^($
^System.Console.Write^(^$
let y = 4
^type Foo() = inherit obj()
[<assembly:System.Security.AllowPartiallyTrustedCallersAttribute>]
@ -1322,7 +1321,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
let xxx = 42
type FooBaz() = class end
module Inner = begin
^System.Console.Write^^($
^System.Console.Write^(^$
let y = 4
^end
type Foo() = inherit obj()
@ -1335,7 +1334,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
type B(x : int) =
new(x1:int, x2: int) = new B(10)
type A() =
inherit ^B^^(1$^,2^)""")
inherit ^B^(^1$,^2^)""")
[<Test>]
member public this.``LocationOfParams.ThisOnceAsserted``() =
@ -1346,7 +1345,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
match args with
| [| y |] ->
for name, kind in (headerNames,
rowType.AddMember(new ^ProvidedProperty^^($
rowType.AddMember(new ^ProvidedProperty^(^$
null
| _ -> failwith "unexpected generic params" )
@ -1372,7 +1371,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParensBeforeModuleKeyword.Bug245850.Case1a``() =
this.TestParameterInfoLocationOfParams("""
module Repro =
for a in ^System.Int16.TryParse^^($
for a in ^System.Int16.TryParse^(^$
^module AA =
let x = 10 """)
@ -1380,7 +1379,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParensBeforeModuleKeyword.Bug245850.Case1b``() =
this.TestParameterInfoLocationOfParams("""
module Repro =
for a in ^System.Int16.TryParse^^("4$2"
for a in ^System.Int16.TryParse^(^"4$2"
^module AA =
let x = 10 """)
@ -1388,7 +1387,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParensBeforeModuleKeyword.Bug245850.Case1c``() =
this.TestParameterInfoLocationOfParams("""
module Repro =
for a in ^System.Int16.TryParse^^("4$2"^,
for a in ^System.Int16.TryParse^(^"4$2",^
^module AA =
let x = 10 """)
@ -1396,7 +1395,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParensBeforeModuleKeyword.Bug245850.Case2a``() =
this.TestParameterInfoLocationOfParams("""
module Repro =
query { for a in ^System.Int16.TryParse^^($
query { for a in ^System.Int16.TryParse^(^$
^module AA =
let x = 10 """)
@ -1404,7 +1403,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParensBeforeModuleKeyword.Bug245850.Case2b``() =
this.TestParameterInfoLocationOfParams("""
module Repro =
query { for a in ^System.Int16.TryParse^^("4$2"
query { for a in ^System.Int16.TryParse^(^"4$2"
^module AA =
let x = 10 """)
@ -1412,7 +1411,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.UnmatchedParensBeforeModuleKeyword.Bug245850.Case2c``() =
this.TestParameterInfoLocationOfParams("""
module Repro =
query { for a in ^System.Int16.TryParse^^("4$2"^,
query { for a in ^System.Int16.TryParse^(^"4$2",^
^module AA =
let x = 10 """)
@ -1424,7 +1423,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
let q2 = query {
for e in T().GetCollection() do
where (e > 250)
^skip^^($
^skip^(^$
^} """)
[<Test>]
@ -1435,7 +1434,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
open System.Linq
let q6 =
query {
for E in ^T().GetCollection().Aggregate^^($
for E in ^T().GetCollection().Aggregate^(^$
^} """)
[<Test>]
@ -1446,7 +1445,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
open System.Linq
let q6 =
query {
for E in ^T().GetCollection().Aggregate^^(42$
for E in ^T().GetCollection().Aggregate^(^42$
^} """)
[<Test>]
@ -1457,7 +1456,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
open System.Linq
let q6 =
query {
for E in ^T().GetCollection().Aggregate^^(42^,$
for E in ^T().GetCollection().Aggregate^(^42,^$
^} """)
[<Test>]
@ -1468,7 +1467,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
open System.Linq
let q6 =
query {
for E in ^T().GetCollection().Aggregate^^(42^, 43$
for E in ^T().GetCollection().Aggregate^(^42,^ 43$
^} """)
(* Tests for type provider static argument parameterinfos ------------------------------------------ *)
@ -1520,85 +1519,85 @@ We really need to rewrite some code paths here to use the real parse tree rather
[<Test>]
member public this.``LocationOfParams.TypeProviders.Basic``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, 42 ^>""",
type U = ^N1.T^<^ "fo$o",^ 42 ^>""",
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.BasicNamed``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, ParamIgnored=42 ^>""",
type U = ^N1.T^<^ "fo$o",^ ParamIgnored=42 ^>""",
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Prefix0``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< $ """, // missing all params, just have <
type U = ^N1.T^<^ $ """, // missing all params, just have <
markAtEnd = true,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Prefix1``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, 42 """, // missing >
type U = ^N1.T^<^ "fo$o",^ 42 """, // missing >
markAtEnd = true,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Prefix1Named``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, ParamIgnored=42 """, // missing >
type U = ^N1.T^<^ "fo$o",^ ParamIgnored=42 """, // missing >
markAtEnd = true,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Prefix2``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, """, // missing last param
type U = ^N1.T^<^ "fo$o",^ """, // missing last param
markAtEnd = true,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Prefix2Named1``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, ParamIgnored= """, // missing last param after name with equals
type U = ^N1.T^<^ "fo$o",^ ParamIgnored= """, // missing last param after name with equals
markAtEnd = true,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Prefix2Named2``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, ParamIgnored """, // missing last param after name sans equals
type U = ^N1.T^<^ "fo$o",^ ParamIgnored """, // missing last param after name sans equals
markAtEnd = true,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Negative1``() =
this.TestNoParameterInfo("""
type D = ^System.Collections.Generic.Dictionary^^< in$t, int ^>""")
type D = ^System.Collections.Generic.Dictionary^<^ in$t, int ^>""")
[<Test>]
member public this.``LocationOfParams.TypeProviders.Negative2``() =
this.TestNoParameterInfo("""
type D = ^System.Collections.Generic.List^^< in$t ^>""")
type D = ^System.Collections.Generic.List^<^ in$t ^>""")
[<Test>]
member public this.``LocationOfParams.TypeProviders.Negative3``() =
this.TestNoParameterInfo("""
let i = 42
let b = ^i^^< 4$2""")
let b = ^i^<^ 4$2""")
[<Test>]
member public this.``LocationOfParams.TypeProviders.Negative4.Bug181000``() =
this.TestNoParameterInfo("""
type U = ^N1.T^^< "foo"^, 42 ^>$ """, // when the caret is right of the '>', we should not report any param info
type U = ^N1.T^<^ "foo",^ 42 ^>$ """, // when the caret is right of the '>', we should not report any param info
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.BasicWithinExpr``() =
this.TestNoParameterInfo("""
let f() =
let r = id( ^N1.T^^< "fo$o"^, ParamIgnored=42 ^> )
let r = id( ^N1.T^<^ "fo$o",^ ParamIgnored=42 ^> )
r """,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
@ -1606,26 +1605,26 @@ We really need to rewrite some code paths here to use the real parse tree rather
member public this.``LocationOfParams.TypeProviders.BasicWithinExpr.DoesNotInterfereWithOuterFunction``() =
this.TestParameterInfoLocationOfParams("""
let f() =
let r = ^id^^( N1.$T< "foo", ParamIgnored=42 > ^)
let r = ^id^(^ N1.$T< "foo", ParamIgnored=42 > ^)
r """,
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Bug199744.ExcessCommasShouldNotAssertAndShouldGiveInfo.Case1``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, 42^, ^, ^>""",
type U = ^N1.T^<^ "fo$o",^ 42,^ ,^ ^>""",
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Bug199744.ExcessCommasShouldNotAssertAndShouldGiveInfo.Case2``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< "fo$o"^, ^, ^>""",
type U = ^N1.T^<^ "fo$o",^ ,^ ^>""",
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
member public this.``LocationOfParams.TypeProviders.Bug199744.ExcessCommasShouldNotAssertAndShouldGiveInfo.Case3``() =
this.TestParameterInfoLocationOfParamsWithVariousSurroundingContexts("""
type U = ^N1.T^^< ^,$ ^>""",
type U = ^N1.T^<^ ,^$ ^>""",
additionalReferenceAssemblies = [PathRelativeToTestAssembly(@"UnitTestsResources\MockTypeProviders\DummyProviderForLanguageServiceTesting.dll")])
[<Test>]
@ -2020,7 +2019,7 @@ We really need to rewrite some code paths here to use the real parse tree rather
(* Project ref method for multi-parameterinfo tests ----------------------------------------------- *)
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Multi.ReferenceToProjectLibrary``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()

Просмотреть файл

@ -1288,13 +1288,11 @@ let f (tp:ITypeProvider(*$$$*)) = tp.Invalidate
]
[<Test>]
[<Category("TakesMoreThanFifteenSeconds")>]
member public this.``LongPaths``() =
let text,cases = this.GetLongPathsTestCases()
this.QuickInfoResolutionTest text cases
[<Test>]
[<Category("TakesMoreThanFifteenSeconds")>]
member public this.``Global.LongPaths``() =
let text,cases = this.GetLongPathsTestCases()
let replace (s:string) = s.Replace("System", "global.System")
@ -1611,7 +1609,6 @@ let f (tp:ITypeProvider(*$$$*)) = tp.Invalidate
// In this bug, relative paths with .. in them weren't working.
[<Test>]
[<Category("PerfCheck")>]
member public this.``BugInRelativePaths``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -1640,7 +1637,6 @@ let f (tp:ITypeProvider(*$$$*)) = tp.Invalidate
// QuickInfo over a type that references types in an unreferenced assembly works.
[<Test>]
[<Category("PerfCheck")>]
member public this.``MissingDependencyReferences.QuickInfo.Bug5409``() =
let code =
["#light"
@ -3153,7 +3149,7 @@ query."
("(*Marker4*)", "Gets and sets X")]
this.VerifyUsingFsTestLib fileContent queries false
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Automation.EnumDUInterfacefromFSBrowse``() =
let fileContent ="""module Test
@ -3200,7 +3196,7 @@ query."
]
this.VerifyUsingFsTestLib fileContent queries true
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Automation.RecordAndInterfaceFromFSProj``() =
let fileContent ="""module Test
@ -3355,7 +3351,7 @@ query."
]
this.VerifyUsingFsTestLib fileContent queries false
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Automation.TupleRecordfromFSBrowse``() =
let fileContent ="""module Test
@ -3392,7 +3388,7 @@ query."
]
this.VerifyUsingFsTestLib fileContent queries true
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Automation.UnionAndStructFromFSProj``() =
let fileContent ="""module Test

Просмотреть файл

@ -977,21 +977,23 @@ type UsingMSBuild() as this =
"""#r "mscorcfg" """ // 'mscorcfg' is loaded from the GAC _and_ it is available on XP and above.
"#r \"mscor" "Global Assembly Cache"
[<Test>]
[<Category("fsx closure")>]
member public this.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFoldersEx``() =
let fileContent = """#r "Microsoft.VisualStudio.QualityTools.Common.dll" """ // 'Microsoft.VisualStudio.QualityTools.Common.dll' is located via AssemblyFoldersEx
let marker = "#r \"Microsoft.Vis"
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.VisualStudio.QualityTools.Common, Version="
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.VisualStudio.QualityTools.Common.dll"
// // Disabled because it seems Microsoft.VisualStudio.QualityTools.Common.dll is no longer always available on CI installs in the same way
// // as it used to be.
// [<Test;Category("fsx closure"); Category("NO_CI")>]
// member public this.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFoldersEx``() =
// let fileContent = """#r "Microsoft.VisualStudio.QualityTools.Common.dll" """ // 'Microsoft.VisualStudio.QualityTools.Common.dll' is located via AssemblyFoldersEx
// let marker = "#r \"Microsoft.Vis"
// this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.VisualStudio.QualityTools.Common, Version="
// this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.VisualStudio.QualityTools.Common.dll"
[<Test>]
[<Category("fsx closure")>]
member public this.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFolders``() =
let fileContent = """#r "Microsoft.SqlServer.SString" """ // Can be any assembly that is in AssemblyFolders but not AssemblyFoldersEx
let marker = "#r \"Microsoft.SqlSe"
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.SqlServer.SString.dll"
this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Found by AssemblyFolders registry key"
// // Disabled because it seems Microsoft.SqlServer.SString.dll is no longer always available on CI installs in the same way
//[<Test>]
//[<Category("fsx closure")>]
//member public this.``Fsx.HashR_QuickInfo.ResolveFromAssemblyFolders``() =
// let fileContent = """#r "Microsoft.SqlServer.SString" """ // Can be any assembly that is in AssemblyFolders but not AssemblyFoldersEx
// let marker = "#r \"Microsoft.SqlSe"
// this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Microsoft.SqlServer.SString.dll"
// this.AssertQuickInfoContainsAtEndOfMarkerInFsxFile fileContent marker "Found by AssemblyFolders registry key"
[<Test>]
[<Category("fsx closure")>]
@ -1304,7 +1306,7 @@ type UsingMSBuild() as this =
// Compile a script which #loads a source file. The build can't succeed without the loaded file.
[<Test>]
[<Test; Category("Expensive")>]
[<Category("fsx closure")>]
[<Category("fsx compile")>]
member public this.``Fsx.CompileFsx_2``() =
@ -1327,7 +1329,7 @@ type UsingMSBuild() as this =
Assert.IsTrue(build.BuildSucceeded, "Expected build to succeed")
// Compile a script which #loads a source file. The build can't succeed without
[<Test>]
[<Test; Category("Expensive")>]
[<Category("fsx closure")>]
[<Category("fsx compile")>]
member public this.``Fsx.CompileFsx_3``() =
@ -1537,8 +1539,7 @@ type UsingMSBuild() as this =
/// There was a problem in which synthetic tokens like #load were causing asserts
[<Test>]
[<Category("PerfCheck")>]
[<Test; Category("Expensive")>]
member public this.``Fsx.SyntheticTokens``() =
Helper.ExhaustivelyScrutinize(
this.TestRunner,
@ -1704,12 +1705,10 @@ type UsingMSBuild() as this =
Assert.IsTrue(countInvaldiationHandlersAdded() - countInvaldiationHandlersRemoved() = 0, "Check6b2, at end, all invalidation handlers removed after explicit cleraring")
checkConfigsDisposed()
[<Test>]
[<Category("TypeProvider")>]
[<Test;Category("TypeProvider"); Category("Expensive")>]
member public this.``TypeProvider.Disposal.SmokeTest1``() = this.TypeProviderDisposalSmokeTest(true)
[<Test>]
[<Category("TypeProvider")>]
[<Test;Category("TypeProvider")>]
member public this.``TypeProvider.Disposal.SmokeTest2``() = this.TypeProviderDisposalSmokeTest(false)

Просмотреть файл

@ -535,7 +535,6 @@ type X() =
/// When a .fs file is opened with no project context we do show squiggles
/// for missing types etc.
[<Test>]
[<Category("PerfCheck")>]
member public this.``OrphanFs.MissingTypesShouldNotShowErrors``() =
let fileContent = """open Unknown(*Mark*)"""
this.VerifySquiggleContainedAtStartOfMarker(fileContent,"(*Mark*)",(Microsoft.VisualStudio.FSharp.LanguageService.Severity.Error, "Unknown"))
@ -550,7 +549,6 @@ type X() =
/// FEATURE: If a .fs file has a BuildAction other than "Compile", it behaves like a
/// single-file-project with regards to intellisense.
[<Test>]
[<Category("PerfCheck")>]
member public this.``Project.FsFileWithBuildActionOtherThanCompileBehavesLikeSingleFileProject``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -571,7 +569,6 @@ type X() =
/// FEATURE: Errors in the code are underlined with red squiggles and a clickable description of the error appears in the Error List.
[<Test>]
[<Category("PerfCheck")>]
member public this.``Basic.Case1``() =
let fileContent = """
let x = 3
@ -580,7 +577,6 @@ type X() =
this.VerifySquiggleContainedAtStartOfMarker(fileContent,"(*Mark*)",(Microsoft.VisualStudio.FSharp.LanguageService.Severity.Error, "This value is not a function and cannot be applied"))
[<Test>]
[<Category("PerfCheck")>]
member public this.``Basic.Case2``() =
let fileContent = """
let x(*Mark*) = 3

Просмотреть файл

@ -162,7 +162,7 @@ type UsingMSBuild() =
AssertNoErrorsOrWarnings(project2)
// FEATURE: When a referenced assembly's timestamp changes the reference is reread.
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Timestamps.ReferenceAssemblyChangeAbsolute``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -208,7 +208,7 @@ type UsingMSBuild() =
printfn "Completions=%A\n" completions
// In this bug, relative paths to referenced assemblies weren't seen.
[<Test>]
[<Test; Category("Expensive")>]
member public this.``Timestamps.ReferenceAssemblyChangeRelative``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()
@ -264,7 +264,7 @@ type UsingMSBuild() =
// FEATURE: When a referenced project's assembly timestamp changes the reference is reread.
[<Test>]
[<Category("TakesMoreThanFifteenSeconds")>]
[<Category("Expensive")>]
member public this.``Timestamps.ProjectReferenceAssemblyChange``() =
use _guard = this.UsingNewVS()
let solution = this.CreateSolution()

Просмотреть файл

@ -535,9 +535,9 @@ type Miscellaneous() =
use project = project
let values = project.BuildActionConverter.GetStandardValues()
let list = values |> Seq.cast |> Seq.map (fun (ba : BuildAction)-> ba.Name) |> Seq.toList
// expected list of build actions is union of standard actions, custom actions, and "extended" standard actions (populated from, e.g., WPF or Fakes)
// expected list of build actions is union of standard actions, custom actions, and "extended" standard actions
// this is not exhaustive (exhaustive list is not static), but covers the main equivalence classes
let expected = ["Compile"; "Content"; "EmbeddedResource"; "None"; "MyBuildAction"; "MyBuildAction3"; "Resource"; "SplashScreen"; "Fakes"]
let expected = ["Compile"; "Content"; "EmbeddedResource"; "None"; "MyBuildAction"; "MyBuildAction3"; "Resource"]
if expected |> List.forall (fun i -> List.exists ((=)i) list) |> not then
let s0 = sprintf "%A" expected
let s1 = sprintf "%A" list

Просмотреть файл

@ -470,7 +470,7 @@ type References() =
let exe = Path.Combine(project.ProjectFolder, "bin\\Debug\\Test.exe")
k exe))
[<Test>]
[<Test; Category("Expensive")>]
member public this.``ReferenceResolution.Bug4423.NonFxAssembly.BrowseTab.RelativeHintPath.InsideProjectDir``() =
// Let's create a run-of-the-mill project just to have a spare assembly around
this.CreateDummyTestProjectBuildItAndDo(fun exe ->