diff --git a/packages.config b/packages.config
index bc6a2579672..a805c432caf 100644
--- a/packages.config
+++ b/packages.config
@@ -22,7 +22,7 @@
-
+
diff --git a/src/FSharpSource.targets b/src/FSharpSource.targets
index 2d8455c5dae..c038d9b5b3d 100644
--- a/src/FSharpSource.targets
+++ b/src/FSharpSource.targets
@@ -105,8 +105,8 @@
3.5.0.0
$(FSharpSourcesRoot)\..\packages\NUnit.$(NUnitVersion)\lib\net45
$(FSharpSourcesRoot)\..\packages\NUnit.ConsoleRunner\$(NUnitVersion)\tools\
- 2.0.3
- 2.0.3.0
+ 2.6.2
+ 2.6.2.0
$(FSharpSourcesRoot)\..\packages\FsCheck.$(FsCheckVersion)\lib\
diff --git a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs
index f979844bd0a..c358409b4b1 100644
--- a/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs
+++ b/src/fsharp/FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections/CollectionModulesConsistency.fs
@@ -8,6 +8,8 @@ open NUnit.Framework
open FsCheck
open Utils
+let smallerSizeCheck testable = Check.One({ Config.QuickThrowOnFailure with EndSize = 25 }, testable)
+
/// helper function that creates labeled FsCheck properties for equality comparisons
let consistency name sqs ls arr =
(sqs = arr) |@ (sprintf "Seq.%s = '%A', Array.%s = '%A'" name sqs name arr) .&.
@@ -22,9 +24,9 @@ let allPairs<'a when 'a : equality> (xs : list<'a>) (xs2 : list<'a>) =
[]
let ``allPairs is consistent`` () =
- Check.QuickThrowOnFailure allPairs
- Check.QuickThrowOnFailure allPairs
- Check.QuickThrowOnFailure allPairs
+ smallerSizeCheck allPairs
+ smallerSizeCheck allPairs
+ smallerSizeCheck allPairs
let append<'a when 'a : equality> (xs : list<'a>) (xs2 : list<'a>) =
let s = xs |> Seq.append xs2 |> Seq.toArray
@@ -35,9 +37,9 @@ let append<'a when 'a : equality> (xs : list<'a>) (xs2 : list<'a>) =
[]
let ``append is consistent`` () =
- Check.QuickThrowOnFailure append
- Check.QuickThrowOnFailure append
- Check.QuickThrowOnFailure append
+ smallerSizeCheck append
+ smallerSizeCheck append
+ smallerSizeCheck append
let averageFloat (xs : NormalFloat []) =
let xs = xs |> Array.map float
@@ -48,7 +50,7 @@ let averageFloat (xs : NormalFloat []) =
[]
let ``average is consistent`` () =
- Check.QuickThrowOnFailure averageFloat
+ smallerSizeCheck averageFloat
let averageBy (xs : float []) f =
let xs = xs |> Array.map float
@@ -61,7 +63,7 @@ let averageBy (xs : float []) f =
[]
let ``averageBy is consistent`` () =
- Check.QuickThrowOnFailure averageBy
+ smallerSizeCheck averageBy
let contains<'a when 'a : equality> (xs : 'a []) x =
let s = xs |> Seq.contains x
@@ -72,9 +74,9 @@ let contains<'a when 'a : equality> (xs : 'a []) x =
[]
let ``contains is consistent`` () =
- Check.QuickThrowOnFailure contains
- Check.QuickThrowOnFailure contains
- Check.QuickThrowOnFailure contains
+ smallerSizeCheck contains
+ smallerSizeCheck contains
+ smallerSizeCheck contains
let choose<'a when 'a : equality> (xs : 'a []) f =
let s = xs |> Seq.choose f |> Seq.toArray
@@ -84,9 +86,9 @@ let choose<'a when 'a : equality> (xs : 'a []) f =
[]
let ``choose is consistent`` () =
- Check.QuickThrowOnFailure choose
- Check.QuickThrowOnFailure choose
- Check.QuickThrowOnFailure choose
+ smallerSizeCheck choose
+ smallerSizeCheck choose
+ smallerSizeCheck choose
let chunkBySize<'a when 'a : equality> (xs : 'a []) size =
let ls = List.ofArray xs
@@ -103,9 +105,9 @@ let chunkBySize<'a when 'a : equality> (xs : 'a []) size =
[]
let ``chunkBySize is consistent`` () =
- Check.QuickThrowOnFailure chunkBySize
- Check.QuickThrowOnFailure chunkBySize
- Check.QuickThrowOnFailure chunkBySize
+ smallerSizeCheck chunkBySize
+ smallerSizeCheck chunkBySize
+ smallerSizeCheck chunkBySize
let collect<'a> (xs : 'a []) f =
let s = xs |> Seq.collect f |> Seq.toArray
@@ -117,9 +119,9 @@ let collect<'a> (xs : 'a []) f =
[]
let ``collect is consistent`` () =
- Check.QuickThrowOnFailure collect
- Check.QuickThrowOnFailure collect
- Check.QuickThrowOnFailure collect
+ smallerSizeCheck collect
+ smallerSizeCheck collect
+ smallerSizeCheck collect
let compareWith<'a>(xs : 'a []) (xs2 : 'a []) f =
let s = (xs, xs2) ||> Seq.compareWith f
@@ -131,9 +133,9 @@ let compareWith<'a>(xs : 'a []) (xs2 : 'a []) f =
[]
let ``compareWith is consistent`` () =
- Check.QuickThrowOnFailure compareWith
- Check.QuickThrowOnFailure compareWith
- Check.QuickThrowOnFailure compareWith
+ smallerSizeCheck compareWith
+ smallerSizeCheck compareWith
+ smallerSizeCheck compareWith
let concat<'a when 'a : equality> (xs : 'a [][]) =
let s = xs |> Seq.concat |> Seq.toArray
@@ -143,9 +145,9 @@ let concat<'a when 'a : equality> (xs : 'a [][]) =
[]
let ``concat is consistent`` () =
- Check.QuickThrowOnFailure concat
- Check.QuickThrowOnFailure concat
- Check.QuickThrowOnFailure concat
+ smallerSizeCheck concat
+ smallerSizeCheck concat
+ smallerSizeCheck concat
let countBy<'a> (xs : 'a []) f =
let s = xs |> Seq.countBy f |> Seq.toArray
@@ -155,9 +157,9 @@ let countBy<'a> (xs : 'a []) f =
[]
let ``countBy is consistent`` () =
- Check.QuickThrowOnFailure countBy
- Check.QuickThrowOnFailure countBy
- Check.QuickThrowOnFailure countBy
+ smallerSizeCheck countBy
+ smallerSizeCheck countBy
+ smallerSizeCheck countBy
let distinct<'a when 'a : comparison> (xs : 'a []) =
let s = xs |> Seq.distinct |> Seq.toArray
@@ -167,9 +169,9 @@ let distinct<'a when 'a : comparison> (xs : 'a []) =
[]
let ``distinct is consistent`` () =
- Check.QuickThrowOnFailure distinct
- Check.QuickThrowOnFailure distinct
- Check.QuickThrowOnFailure distinct
+ smallerSizeCheck distinct
+ smallerSizeCheck distinct
+ smallerSizeCheck distinct
let distinctBy<'a when 'a : equality> (xs : 'a []) f =
let s = xs |> Seq.distinctBy f |> Seq.toArray
@@ -179,9 +181,9 @@ let distinctBy<'a when 'a : equality> (xs : 'a []) f =
[]
let ``distinctBy is consistent`` () =
- Check.QuickThrowOnFailure distinctBy
- Check.QuickThrowOnFailure distinctBy
- Check.QuickThrowOnFailure distinctBy
+ smallerSizeCheck distinctBy
+ smallerSizeCheck distinctBy
+ smallerSizeCheck distinctBy
let exactlyOne<'a when 'a : comparison> (xs : 'a []) =
let s = runAndCheckErrorType (fun () -> xs |> Seq.exactlyOne)
@@ -191,9 +193,9 @@ let exactlyOne<'a when 'a : comparison> (xs : 'a []) =
[]
let ``exactlyOne is consistent`` () =
- Check.QuickThrowOnFailure exactlyOne
- Check.QuickThrowOnFailure exactlyOne
- Check.QuickThrowOnFailure exactlyOne
+ smallerSizeCheck exactlyOne
+ smallerSizeCheck exactlyOne
+ smallerSizeCheck exactlyOne
let except<'a when 'a : equality> (xs : 'a []) (itemsToExclude: 'a []) =
let s = xs |> Seq.except itemsToExclude |> Seq.toArray
@@ -203,9 +205,9 @@ let except<'a when 'a : equality> (xs : 'a []) (itemsToExclude: 'a []) =
[]
let ``except is consistent`` () =
- Check.QuickThrowOnFailure except
- Check.QuickThrowOnFailure except
- Check.QuickThrowOnFailure except
+ smallerSizeCheck except
+ smallerSizeCheck except
+ smallerSizeCheck except
let exists<'a when 'a : equality> (xs : 'a []) f =
let s = xs |> Seq.exists f
@@ -215,9 +217,9 @@ let exists<'a when 'a : equality> (xs : 'a []) f =
[]
let ``exists is consistent`` () =
- Check.QuickThrowOnFailure exists
- Check.QuickThrowOnFailure exists
- Check.QuickThrowOnFailure exists
+ smallerSizeCheck exists
+ smallerSizeCheck exists
+ smallerSizeCheck exists
let exists2<'a when 'a : equality> (xs':('a*'a) []) f =
let xs = Array.map fst xs'
@@ -229,9 +231,9 @@ let exists2<'a when 'a : equality> (xs':('a*'a) []) f =
[]
let ``exists2 is consistent for collections with equal length`` () =
- Check.QuickThrowOnFailure exists2
- Check.QuickThrowOnFailure exists2
- Check.QuickThrowOnFailure exists2
+ smallerSizeCheck exists2
+ smallerSizeCheck exists2
+ smallerSizeCheck exists2
let filter<'a when 'a : equality> (xs : 'a []) predicate =
let s = xs |> Seq.filter predicate
@@ -241,9 +243,9 @@ let filter<'a when 'a : equality> (xs : 'a []) predicate =
[]
let ``filter is consistent`` () =
- Check.QuickThrowOnFailure filter
- Check.QuickThrowOnFailure filter
- Check.QuickThrowOnFailure filter
+ smallerSizeCheck filter
+ smallerSizeCheck filter
+ smallerSizeCheck filter
let find<'a when 'a : equality> (xs : 'a []) predicate =
let s = run (fun () -> xs |> Seq.find predicate)
@@ -253,9 +255,9 @@ let find<'a when 'a : equality> (xs : 'a []) predicate =
[]
let ``find is consistent`` () =
- Check.QuickThrowOnFailure find
- Check.QuickThrowOnFailure find
- Check.QuickThrowOnFailure find
+ smallerSizeCheck find
+ smallerSizeCheck find
+ smallerSizeCheck find
let findBack<'a when 'a : equality> (xs : 'a []) predicate =
let s = run (fun () -> xs |> Seq.findBack predicate)
@@ -265,9 +267,9 @@ let findBack<'a when 'a : equality> (xs : 'a []) predicate =
[]
let ``findBack is consistent`` () =
- Check.QuickThrowOnFailure findBack
- Check.QuickThrowOnFailure findBack
- Check.QuickThrowOnFailure findBack
+ smallerSizeCheck findBack
+ smallerSizeCheck findBack
+ smallerSizeCheck findBack
let findIndex<'a when 'a : equality> (xs : 'a []) predicate =
let s = run (fun () -> xs |> Seq.findIndex predicate)
@@ -277,9 +279,9 @@ let findIndex<'a when 'a : equality> (xs : 'a []) predicate =
[]
let ``findIndex is consistent`` () =
- Check.QuickThrowOnFailure findIndex
- Check.QuickThrowOnFailure findIndex
- Check.QuickThrowOnFailure findIndex
+ smallerSizeCheck findIndex
+ smallerSizeCheck findIndex
+ smallerSizeCheck findIndex
let findIndexBack<'a when 'a : equality> (xs : 'a []) predicate =
let s = run (fun () -> xs |> Seq.findIndexBack predicate)
@@ -289,9 +291,9 @@ let findIndexBack<'a when 'a : equality> (xs : 'a []) predicate =
[]
let ``findIndexBack is consistent`` () =
- Check.QuickThrowOnFailure findIndexBack
- Check.QuickThrowOnFailure findIndexBack
- Check.QuickThrowOnFailure findIndexBack
+ smallerSizeCheck findIndexBack
+ smallerSizeCheck findIndexBack
+ smallerSizeCheck findIndexBack
let fold<'a,'b when 'b : equality> (xs : 'a []) f (start:'b) =
let s = run (fun () -> xs |> Seq.fold f start)
@@ -301,10 +303,10 @@ let fold<'a,'b when 'b : equality> (xs : 'a []) f (start:'b) =
[]
let ``fold is consistent`` () =
- Check.QuickThrowOnFailure fold
- Check.QuickThrowOnFailure fold
- Check.QuickThrowOnFailure fold
- Check.QuickThrowOnFailure fold
+ smallerSizeCheck fold
+ smallerSizeCheck fold
+ smallerSizeCheck fold
+ smallerSizeCheck fold
let fold2<'a,'b,'c when 'c : equality> (xs': ('a*'b)[]) f (start:'c) =
let xs = xs' |> Array.map fst
@@ -316,12 +318,12 @@ let fold2<'a,'b,'c when 'c : equality> (xs': ('a*'b)[]) f (start:'c) =
[]
let ``fold2 is consistent`` () =
- Check.QuickThrowOnFailure fold2
- Check.QuickThrowOnFailure fold2
- Check.QuickThrowOnFailure fold2
- Check.QuickThrowOnFailure fold2
- Check.QuickThrowOnFailure fold2
- Check.QuickThrowOnFailure fold2
+ smallerSizeCheck fold2
+ smallerSizeCheck fold2
+ smallerSizeCheck fold2
+ smallerSizeCheck fold2
+ smallerSizeCheck fold2
+ smallerSizeCheck fold2
let foldBack<'a,'b when 'b : equality> (xs : 'a []) f (start:'b) =
let s = run (fun () -> Seq.foldBack f xs start)
@@ -331,10 +333,10 @@ let foldBack<'a,'b when 'b : equality> (xs : 'a []) f (start:'b) =
[]
let ``foldBack is consistent`` () =
- Check.QuickThrowOnFailure foldBack
- Check.QuickThrowOnFailure foldBack
- Check.QuickThrowOnFailure foldBack
- Check.QuickThrowOnFailure foldBack
+ smallerSizeCheck foldBack
+ smallerSizeCheck foldBack
+ smallerSizeCheck foldBack
+ smallerSizeCheck foldBack
let foldBack2<'a,'b,'c when 'c : equality> (xs': ('a*'b)[]) f (start:'c) =
let xs = xs' |> Array.map fst
@@ -346,12 +348,12 @@ let foldBack2<'a,'b,'c when 'c : equality> (xs': ('a*'b)[]) f (start:'c) =
[]
let ``foldBack2 is consistent`` () =
- Check.QuickThrowOnFailure foldBack2
- Check.QuickThrowOnFailure foldBack2
- Check.QuickThrowOnFailure foldBack2
- Check.QuickThrowOnFailure foldBack2
- Check.QuickThrowOnFailure foldBack2
- Check.QuickThrowOnFailure foldBack2
+ smallerSizeCheck foldBack2
+ smallerSizeCheck foldBack2
+ smallerSizeCheck foldBack2
+ smallerSizeCheck foldBack2
+ smallerSizeCheck foldBack2
+ smallerSizeCheck foldBack2
let forall<'a when 'a : equality> (xs : 'a []) f =
let s = xs |> Seq.forall f
@@ -361,9 +363,9 @@ let forall<'a when 'a : equality> (xs : 'a []) f =
[]
let ``forall is consistent`` () =
- Check.QuickThrowOnFailure forall
- Check.QuickThrowOnFailure forall
- Check.QuickThrowOnFailure forall
+ smallerSizeCheck forall
+ smallerSizeCheck forall
+ smallerSizeCheck forall
let forall2<'a when 'a : equality> (xs':('a*'a) []) f =
let xs = Array.map fst xs'
@@ -375,9 +377,9 @@ let forall2<'a when 'a : equality> (xs':('a*'a) []) f =
[]
let ``forall2 is consistent for collections with equal length`` () =
- Check.QuickThrowOnFailure forall2
- Check.QuickThrowOnFailure forall2
- Check.QuickThrowOnFailure forall2
+ smallerSizeCheck forall2
+ smallerSizeCheck forall2
+ smallerSizeCheck forall2
let groupBy<'a when 'a : equality> (xs : 'a []) f =
let s = run (fun () -> xs |> Seq.groupBy f |> Seq.toArray |> Array.map (fun (x,xs) -> x,xs |> Seq.toArray))
@@ -387,9 +389,9 @@ let groupBy<'a when 'a : equality> (xs : 'a []) f =
[]
let ``groupBy is consistent`` () =
- Check.QuickThrowOnFailure groupBy
- Check.QuickThrowOnFailure groupBy
- Check.QuickThrowOnFailure groupBy
+ smallerSizeCheck groupBy
+ smallerSizeCheck groupBy
+ smallerSizeCheck groupBy
let head<'a when 'a : equality> (xs : 'a []) =
let s = runAndCheckIfAnyError (fun () -> xs |> Seq.head)
@@ -399,9 +401,9 @@ let head<'a when 'a : equality> (xs : 'a []) =
[]
let ``head is consistent`` () =
- Check.QuickThrowOnFailure head
- Check.QuickThrowOnFailure head
- Check.QuickThrowOnFailure head
+ smallerSizeCheck head
+ smallerSizeCheck head
+ smallerSizeCheck head
let indexed<'a when 'a : equality> (xs : 'a []) =
let s = xs |> Seq.indexed |> Seq.toArray
@@ -411,9 +413,9 @@ let indexed<'a when 'a : equality> (xs : 'a []) =
[]
let ``indexed is consistent`` () =
- Check.QuickThrowOnFailure indexed
- Check.QuickThrowOnFailure indexed
- Check.QuickThrowOnFailure indexed
+ smallerSizeCheck indexed
+ smallerSizeCheck indexed
+ smallerSizeCheck indexed
let init<'a when 'a : equality> count f =
let s = runAndCheckErrorType (fun () -> Seq.init count f |> Seq.toArray)
@@ -423,9 +425,9 @@ let init<'a when 'a : equality> count f =
[]
let ``init is consistent`` () =
- Check.QuickThrowOnFailure init
- Check.QuickThrowOnFailure init
- Check.QuickThrowOnFailure init
+ smallerSizeCheck init
+ smallerSizeCheck init
+ smallerSizeCheck init
let isEmpty<'a when 'a : equality> (xs : 'a []) =
let s = xs |> Seq.isEmpty
@@ -435,9 +437,9 @@ let isEmpty<'a when 'a : equality> (xs : 'a []) =
[]
let ``isEmpty is consistent`` () =
- Check.QuickThrowOnFailure isEmpty
- Check.QuickThrowOnFailure isEmpty
- Check.QuickThrowOnFailure isEmpty
+ smallerSizeCheck isEmpty
+ smallerSizeCheck isEmpty
+ smallerSizeCheck isEmpty
let item<'a when 'a : equality> (xs : 'a []) index =
let s = runAndCheckIfAnyError (fun () -> xs |> Seq.item index)
@@ -447,9 +449,9 @@ let item<'a when 'a : equality> (xs : 'a []) index =
[]
let ``item is consistent`` () =
- Check.QuickThrowOnFailure item
- Check.QuickThrowOnFailure item
- Check.QuickThrowOnFailure item
+ smallerSizeCheck item
+ smallerSizeCheck item
+ smallerSizeCheck item
let iter<'a when 'a : equality> (xs : 'a []) f' =
let list = System.Collections.Generic.List<'a>()
@@ -466,9 +468,9 @@ let iter<'a when 'a : equality> (xs : 'a []) f' =
[]
let ``iter looks at every element exactly once and in order - consistenly over all collections`` () =
- Check.QuickThrowOnFailure iter
- Check.QuickThrowOnFailure iter
- Check.QuickThrowOnFailure iter
+ smallerSizeCheck iter
+ smallerSizeCheck iter
+ smallerSizeCheck iter
let iter2<'a when 'a : equality> (xs' : ('a*'a) []) f' =
let xs = xs' |> Array.map fst
@@ -487,9 +489,9 @@ let iter2<'a when 'a : equality> (xs' : ('a*'a) []) f' =
[]
let ``iter2 looks at every element exactly once and in order - consistenly over all collections when size is equal`` () =
- Check.QuickThrowOnFailure iter2
- Check.QuickThrowOnFailure iter2
- Check.QuickThrowOnFailure iter2
+ smallerSizeCheck iter2
+ smallerSizeCheck iter2