foundry-rs / foundry-rs/foundry
Tests could warn, when vm.warp() was used to reduce/decrease the timestamp
Open
A-cheatcodes
C-forge
Cmd-forge-test
T-feature
- Dominant language
- Rust
- Stars
- 10.6k
- Forks
- 2.6k
- Avg merge
- 18h 20m
- Merged PRs (30d)
- 510
Description
### Component
Forge
### Describe the feature you would like
This Situation, ok I was also stupid.
I am debugging some tests, and don't know, why they fail. In the end, it was because somewhere deep in my test setups I set `vm.warp(1 hours);`, and in the test I wrote I set `vm.warp(1);`, and this lead to a underflow error.
**Proposed solution:**
- When tests detect a warp that decreases the blocktime AND when tests fails, a hint is given that the blocktime was reduced.
If this is a bad idea, just close :-)
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.