( error: Annotations.ToArbitrary.TypeParameter<E>, defect: Annotations.ToArbitrary.TypeParameter<D> )
| 10391 | ) |
| 10392 | |
| 10393 | function causeReasonToArbitrary<E, D>( |
| 10394 | error: Annotations.ToArbitrary.TypeParameter<E>, |
| 10395 | defect: Annotations.ToArbitrary.TypeParameter<D> |
| 10396 | ) { |
| 10397 | return (fc: typeof FastCheck, ctx: Annotations.ToArbitrary.Context) => { |
| 10398 | const terminal = fc.constant(Cause_.makeInterruptReason()) |
| 10399 | const arbitrary = fc.oneof( |
| 10400 | terminal, |
| 10401 | fc.integer({ min: 1 }).map(Cause_.makeInterruptReason), |
| 10402 | error.arbitrary.map((e) => Cause_.makeFailReason(e)), |
| 10403 | defect.arbitrary.map((d) => Cause_.makeDieReason(d)) |
| 10404 | ) |
| 10405 | return withRecursion(fc, ctx, terminal, arbitrary) |
| 10406 | } |
| 10407 | } |
| 10408 | |
| 10409 | function causeReasonToEquivalence<E>(error: Equivalence.Equivalence<E>, defect: Equivalence.Equivalence<unknown>) { |
| 10410 | return (a: Cause_.Reason<E>, b: Cause_.Reason<E>) => { |
no test coverage detected