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: Fixing coverage support for Checkpoints Library #184

Closed
0xrajath opened this issue Mar 27, 2023 · 0 comments · Fixed by #191
Closed

test: Fixing coverage support for Checkpoints Library #184

0xrajath opened this issue Mar 27, 2023 · 0 comments · Fixed by #191
Assignees

Comments

@0xrajath
Copy link
Contributor

Currently the coverage report for the Checkpoints Library shows up as 0%.
We need to fix it by refactoring a bit as stated in foundry-rs/foundry#3128 (comment)

@0xrajath 0xrajath self-assigned this Mar 27, 2023
0xrajath added a commit that referenced this issue Mar 30, 2023
**Motivation:**

Currently the coverage report for the Checkpoints Library shows up as
0%.
We need to fix it by refactoring the Checkpoints Mock in
`Checkpoints.t.sol` as stated in
foundry-rs/foundry#3128 (comment)

**Modifications:**

* Refactoring Checkpoints Mock from:

```
contract LibHelper {
    function increment(uint256 a) external returns (uint256 r) {
        r = Lib.increment(a);
    }
}
```

to 

```
contract LibHelper {
    function increment(uint256 a) external returns (uint256) {
        uint256 r = Lib.increment(a);
        return r;
    }
}
```

* Removing `using for` notation in Checkpoints Mock
* Setting coverage threshold back to 80%

**Result:**

Increased code coverage for Checkpoints Library. Closes #184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant