File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -390,7 +390,4 @@ module Sequential =
390390 return ( combinedJournal, Failure)
391391 }
392392
393- // Create property from async computation that returns (Journal, Outcome)
394- // The lazy ensures execution only happens when forced (during followPath in recheck)
395- Gen.constant ( lazy ( Async.RunSynchronously executionAsync))
396- |> Property.ofGen
393+ Property.ofAsyncWithJournal executionAsync
Original file line number Diff line number Diff line change @@ -118,7 +118,12 @@ module Property =
118118 /// The property succeeds when the async computation completes successfully, and fails if it throws an exception.
119119 /// This enables testing of asynchronous F# code.
120120 let ofAsync ( asyncComputation : Async < 'T >) : Property < 'T > =
121- Gen.constant ( lazy ( PropertyResult.ofAsyncWith asyncComputation))
121+ Gen.constant ( lazy ( PropertyResult.ofAsync asyncComputation))
122+ |> Property
123+
124+ /// Create Property from an async computation that produces a journal and outcome
125+ let ofAsyncWithJournal ( asyncComputation : Async < Journal * Outcome < 'T >>) : Property < 'T > =
126+ Gen.constant ( lazy ( PropertyResult.ofAsyncWithJournal asyncComputation))
122127 |> Property
123128
124129 /// Discards test cases where the predicate returns false, causing Hedgehog to generate a new test case.
Original file line number Diff line number Diff line change @@ -14,11 +14,11 @@ module internal PropertyResult =
1414 PropertyResult.Sync ( journal, outcome)
1515
1616 /// Create an async PropertyResult from an async computation that produces a journal and outcome
17- let ofAsync ( asyncResult : Async < Journal * Outcome < 'a >>) : PropertyResult < 'a > =
17+ let ofAsyncWithJournal ( asyncResult : Async < Journal * Outcome < 'a >>) : PropertyResult < 'a > =
1818 PropertyResult.Async asyncResult
1919
2020 /// Create an async PropertyResult by capturing exceptions from an async computation
21- let ofAsyncWith ( asyncComputation : Async < 'a >) : PropertyResult < 'a > =
21+ let ofAsync ( asyncComputation : Async < 'a >) : PropertyResult < 'a > =
2222 PropertyResult.Async ( async {
2323 try
2424 let! result = asyncComputation
You can’t perform that action at this time.
0 commit comments