hedgehogqa / fsharp-hedgehog

Release with confidence, state-of-the-art property testing for .NET.
https://hedgehogqa.github.io/fsharp-hedgehog/
Other
271 stars 31 forks source link

Example on the front page is wrong #448

Open LAC-Tech opened 10 months ago

LAC-Tech commented 10 months ago
let propReverse : Property<bool> =
    property {
        let! xs = Gen.list (Range.linear 0 100) Gen.alpha
        return xs |> List.rev |> List.rev = xs
        }

This can't be piped into Property.render |> printfn "%s", Property.render needs Property<unit> as an argument.

I got hedgehog with dotnet package add Hedgehog

TysonMN commented 9 months ago

Thanks for reporting.

The correct fix is to first pipe into Property.falseToFailure.

Can you create a PR with this change?