Skip to content

Commit

Permalink
Add test that fails when trying to print None (i.e. null) hedgehogqa#381
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonMN committed Nov 19, 2021
1 parent 44bfe70 commit 812903d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Hedgehog.Tests/PropertyTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,13 @@ let propertyTests = testList "Property tests" [
#else
Expect.stringContains report guid "Missing counterexample text"
#endif

testCase "Report containing None renders without throwing an exception" <| fun () ->
property {
let! opt = Gen.constant () |> Gen.option
return opt.IsSome
}
|> Property.report
|> Report.render
|> ignore
]

0 comments on commit 812903d

Please sign in to comment.