Add flag: returnBool for property testing#660
Open
montyly wants to merge 7 commits intocrytic:masterfrom
Open
Conversation
elopez
reviewed
Aug 4, 2025
Member
elopez
left a comment
There was a problem hiding this comment.
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"` |
Member
There was a problem hiding this comment.
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 <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Co-authored-by: Emilio López <2642849+elopez@users.noreply.github.com>
Contributor
Author
|
@elopez the way I have seen people using it in foundry setup is basically that the It would be the same as having |
Member
Resolve conflicts in fuzzing/utils/fuzz_method_utils.go by combining: - PR crytic#660's propertyTestReturnBool parameter for flexible property testing - Master's warning message return values for invalid test signatures The merged IsPropertyTest() now accepts propertyTestReturnBool and returns (bool, string) to support both features simultaneously. Also fix dprint.json to use correct yaml plugin URL (add missing 'v' prefix), and fix markdown formatting in docs. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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