Skip to content
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

test: add more positive fuzz test cases #7101

Merged
merged 6 commits into from
Feb 27, 2024
Merged

Conversation

malik672
Copy link
Contributor

@malik672 malik672 commented Feb 13, 2024

Closes #971

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this interferes with an existing test

@malik672
Copy link
Contributor Author

I think this interferes with an existing test

what do you think I should do

@malik672 malik672 reopened this Feb 17, 2024
@malik672
Copy link
Contributor Author

do you think the failure here might be to race conditons

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the issue here is that these functions are being run in another test:

--- TRY 3 STDERR: forge::it fuzz::test_fuzz ---
thread 'fuzz::test_fuzz' panicked at crates\forge\tests\it\fuzz.rs:37:22:
Test testSuccessChecker(uint256) did not fail as expected.
Reason: None
Logs:

I think the best solution here would be to move the new tests to a new contract/file

@malik672
Copy link
Contributor Author

ok

Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nits

testdata/trace/Trace.t.sol Outdated Show resolved Hide resolved
testdata/cheats/ReadCallers.t.sol Outdated Show resolved Hide resolved
testdata/cheats/Broadcast.t.sol Outdated Show resolved Hide resolved
@onbjerg onbjerg changed the title fix issue #971 test: add more positive fuzz test cases Feb 22, 2024
@malik672
Copy link
Contributor Author

I think I've fixed it

crates/forge/tests/it/fuzz.rs Outdated Show resolved Hide resolved
Copy link
Contributor Author

@malik672 malik672 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@onbjerg onbjerg merged commit 85b4872 into foundry-rs:master Feb 27, 2024
19 checks passed
zeroXbrock pushed a commit to flashbots/suavex-foundry that referenced this pull request Apr 2, 2024
* changes

* changes

* proposed fix

* format

* fixed

* Update crates/forge/tests/it/fuzz.rs

Co-authored-by: Oliver Nordbjerg <[email protected]>

---------

Co-authored-by: Oliver Nordbjerg <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more positive fuzz tests to the test suite
3 participants