-
Notifications
You must be signed in to change notification settings - Fork 30
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
Gen registration and creation? #93
Comments
I find this a very interesting question. The plan is to have the F# version in line with the Haskell one. In the Haskell version there are no Actually, in F#, things are even worse because there's currently no direct support for type classes, and you'd have to simulate them instead (like FsCheck does—which, in my opinion, was a design mistake). Even Kurt Schelfthout, the author of FsCheck (that currently supports what you describe), was not sure if To simulate the /cc @jystic |
Yeah, I've never liked Arbitrary, it just gets in the way and seems a bit...arbitrary. I was thinking something like Infers. Tutorial here (https://github.com/AnthonyLloyd/Infers/blob/master/Docs/Tutorial.md) but gone from repo. I love the automatic shrinking by default but would need to be able to gen DUs etc automatically to be able to use it in testing. |
I'd be nice to see an example of this using Infers 👍 Apart from that, I think we should close this issue. We can still add comments, and even reopen it in the future, if necessary. |
Sure |
I wrote an example in #133 (comment) where you can automatically generate DUs and pretty much any other type. |
Great. I love hedgehog and have been using it on a nested DU domain model. Interestingly the automatic gen of this model from FsCheck is wrong for me because it generates each top level case with the same probability etc. I really need each leaf case to be generated with the same probability. So coded the gen. I'd be interested in adding hedgehog to Expecto if the automatic gen was added and we were certain that FsCheck would never be refactored to work as hedgehog does without |
FWIW, @cmeeren provided an updated, configurable, version of arbitrary POCO generartion in #133 (comment). |
Do you plan on this kind of feature? Gen.type<'a> from already registered Gen types.
The text was updated successfully, but these errors were encountered: