-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow tuning of size distribution introduced in 2.10.0 #444
Comments
I became convinced that the way the original quickcheck distributed size is less than ideal; what we're used to is not necessarily better. Also, my sense is that adding distributors causes more complexity than it's worth. The options available in FsCheck today, and likely for the forseeable future, are:
|
Just to let you know I've changed my mind about what I said above. I now think we should somehow allow either the old or the new behavior for product-like types, and that it should be configurable. I need to think a bit of how to fit it into the API though, and it will go into v3. |
I am having similar issue, i.e.: having such a signature: On the other hand, if I change The type ProviderId = ProviderId of string
type Currency = Currency of string
type Pair = Currency * Currency
type Rate = Rate of decimal
type RateObject = { Pair: Pair; Rate: Rate; ValidFrom: Instant } What is wrong? Why the generated data is so bad? On one side the lists are empty 3/5 times, on the other I cannot even get an empty list to see if the code handles it well. Please advise. |
I am having this problem too. When generating a record with a few This is problematic because this way the actual coverage is very small. Has anyone found a workaround? Except to tuning |
Why not? Increasing |
From my experience with other QuickCheck libraries, I was surprised by the prevalence of ("", 0) in this:
I've briefly scanned the paper you reference in the release notes for 2.10.0, and, if I understand correctly, FSCheck is only using the fixedSize Distributor described in the paper. I think it would be useful to implement the other Distributors described, and provide some mechanism for selecting them when generating data.
The text was updated successfully, but these errors were encountered: