@@ -191,20 +191,6 @@ module SkewBinomialHeapTest =
191191 }
192192
193193
194- //@@@@@@@@@@@@@@@@@@@
195- let iComparableGen () : Gen < IComparable > =
196- gen {
197- let! t =
198- Arb.generate
199- |> Gen.filter( fun x ->
200- match x :> obj with
201- | : ? System .IComparable -> true
202- | _ -> false )
203-
204- return t :> System .IComparable
205- }
206- //|> Arb.fromGen
207-
208194 let genDesc d =
209195 match d with
210196 | Some v -> Gen.constant v
@@ -213,7 +199,8 @@ module SkewBinomialHeapTest =
213199 let emptyOnly d =
214200 gen {
215201 let! desc = genDesc d
216- let! s = Gen.listOf( Arb.generate< 'T>)
202+ let! n = Gen.choose( 0 , 12 )
203+ let! s = Gen.listOfLength n Arb.generate< int>
217204
218205 return
219206 { Heap =
@@ -227,7 +214,8 @@ module SkewBinomialHeapTest =
227214 gen {
228215 let! desc = genDesc d
229216 let! t = Gen.elements [ true ; false ]
230- let! s = Gen.nonEmptyListOf <| iComparableGen()
217+ let! n = Gen.length1thru12
218+ let! s = Gen.listOfLength n Arb.generate< int>
231219
232220 let! ndel =
233221 if t then
@@ -302,7 +290,7 @@ module SkewBinomialHeapTest =
302290 ( Prop.forAll( Arb.fromGen heapStringGen)
303291 <| fun ( heap , orig ) -> heap |> SkewBinomialHeap.toSeq |> Seq.toList = sortList heap orig)
304292
305- ptestPropertyWithConfig
293+ testPropertyWithConfig
306294 config10k
307295 " toList returns the same as toSeq |> List.ofSeq"
308296 ( Prop.forAll( comparableAndComparable())
@@ -535,7 +523,7 @@ module SkewBinomialHeapTest =
535523 // |> SkewBinomialHeap.toList
536524 // |> Expect.equal "" (orig1 |> List.append orig2 |> sortList heap1))
537525
538- ptestPropertyWithConfig
526+ testPropertyWithConfig
539527 config10k
540528 " merge throws when both heaps have diferent ordering"
541529 ( Prop.forAll( differentOrdered())
@@ -592,7 +580,7 @@ module SkewBinomialHeapTest =
592580 ////Maybe the distribution of the hash should be checked
593581 ////to avoid bad hashes, I don't know if that should be done as part of unit testPropertyWithConfig config10king
594582
595- ptestPropertyWithConfig
583+ testPropertyWithConfig
596584 config10k
597585 " Equality reflexivity"
598586 ( Prop.forAll( comparableAndComparable())
0 commit comments