foundry: `forge coverage` does not work for if statements within for loops
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (70f4fb5 2022-11-03T00:06:25.653195Z)
What command(s) is the bug in?
forge coverage
Operating System
macOS (Apple Silicon)
Describe the bug
When I run forge coverage to test the coverage for my code, I found that I have written the code to match the all branches but the result seems not. If I call the external function, it will not cover this branch.

The coverage result is

But I think my test function have covered all situations, and the result is not
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 18 (11 by maintainers)
No, @deboguer-jng. Also, I have never been involved in the development of the
forge coveragecommand - I am just a user like you.No worries, @KittyFu307. Pinging @onbjerg in case he could take a quick look? Seems like an easy fix.
Sure~ have already done
Hi @rkrasiuk any update for this issue? Thank you for your time