-
Notifications
You must be signed in to change notification settings - Fork 74
Add flag: returnBool for property testing #660
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I'm overall confused about the feature though, wouldn't a property that does not return a boolean not be a property? It sounds like it would be something for the assertion testing mode instead.
| TestPrefixes []string `json:"testPrefixes"` | ||
|
|
||
| // TestReturnBool dictactes if the properties should return a bool or not | ||
| TestReturnBool bool `json:"returnBool"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but maybe it needs to be unified the other way to testReturnBool? it seems JSON options match their Go counterparts.
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Emilio López <[email protected]>
|
@elopez the way I have seen people using it in foundry setup is basically that the It would be the same as having |
returnBoolset to false will make medusa accept properties that don't return a boolean.This is meant to mimic foundry's behavior, and ease the compatibility between the two tools. See https://getfoundry.sh/forge/advanced-testing/invariant-testing/#conditional-invariants