by Noumenon72 · 6y ago · 0 comments
For someone new to the way you define property and contracts, the second sentence is not enough definition. The article made sense once I found other links in the article defining property and contracts: https://fsharpforfunandprofit.com/posts/property-based-testi... and https://www.hillelwayne.com/post/contracts/.
I would summarize by saying
> A different testing style is property based testing (PBT) with contracts. By testing invariant properties like commutativity instead of specific cases, and writing the functions under test with assertion-like contracts that fail if they ever attempt invalid behavior, we can test with random input data and cover more of the search space than we would manually.
I had a this problem when writing a very similar blog post.