Skip to content

Implement coverage tests#30

Merged
0age merged 20 commits intomainfrom
coverage
Nov 8, 2025
Merged

Implement coverage tests#30
0age merged 20 commits intomainfrom
coverage

Conversation

@0age
Copy link
Contributor

@0age 0age commented Nov 8, 2025

This PR adds support for running coverage tests via FOUNDRY_PROFILE=coverage forge coverage.

A minor interface modification was required to handle stack depth issues with the legacy pipeline: the adjuster and adjustmentAuthorization arguments on a few functions have been bundled into the Adjustment struct argument.

Here's the current snapshot of coverage:

╭---------------------------------------+------------------+------------------+-----------------+-----------------╮
| File                                  | % Lines          | % Statements     | % Branches      | % Funcs         |
+=================================================================================================================+
| src/BlockNumberish.sol                | 75.00% (3/4)     | 50.00% (2/4)     | 0.00% (0/2)     | 100.00% (1/1)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| src/ERC7683Tribunal.sol               | 90.91% (20/22)   | 96.00% (24/25)   | 100.00% (1/1)   | 66.67% (2/3)    |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| src/Tribunal.sol                      | 77.46% (299/386) | 80.36% (315/392) | 60.32% (38/63)  | 77.36% (41/53)  |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| src/lib/DomainLib.sol                 | 72.00% (18/25)   | 68.18% (15/22)   | 0.00% (0/1)     | 100.00% (3/3)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| src/lib/PriceCurveLib.sol             | 69.15% (65/94)   | 63.30% (69/109)  | 80.00% (12/15)  | 66.67% (6/9)    |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/ERC7683Tribunal.t.sol            | 100.00% (61/61)  | 100.00% (73/73)  | 100.00% (0/0)   | 100.00% (11/11) |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/TribunalE2ETest.t.sol            | 80.00% (12/15)   | 80.00% (8/10)    | 50.00% (1/2)    | 80.00% (4/5)    |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/TribunalFillComponentTest.t.sol  | 100.00% (11/11)  | 100.00% (10/10)  | 100.00% (0/0)   | 100.00% (1/1)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/helpers/DeployTheCompact.sol     | 92.31% (12/13)   | 93.75% (15/16)   | 50.00% (2/4)    | 100.00% (1/1)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/helpers/PriceCurveTestHelper.sol | 100.00% (2/2)    | 100.00% (2/2)    | 100.00% (0/0)   | 100.00% (1/1)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/mocks/FillerContract.sol         | 100.00% (1/1)    | 100.00% (0/0)    | 100.00% (0/0)   | 100.00% (1/1)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/mocks/MockDispatchTarget.sol     | 100.00% (47/47)  | 100.00% (49/49)  | 56.67% (17/30)  | 100.00% (4/4)   |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/mocks/MockERC20.sol              | 50.00% (4/8)     | 50.00% (2/4)     | 100.00% (0/0)   | 50.00% (2/4)    |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/mocks/MockTheCompact.sol         | 0.00% (0/2)      | 0.00% (0/1)      | 100.00% (0/0)   | 0.00% (0/1)     |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| test/mocks/ReentrantReceiver.sol      | 73.08% (19/26)   | 78.26% (18/23)   | 50.00% (1/2)    | 50.00% (2/4)    |
|---------------------------------------+------------------+------------------+-----------------+-----------------|
| Total                                 | 80.06% (574/717) | 81.35% (602/740) | 60.00% (72/120) | 78.43% (80/102) |
╰---------------------------------------+------------------+------------------+-----------------+-----------------╯

@0age 0age merged commit 6b4cb58 into main Nov 8, 2025
5 checks passed
@0age 0age deleted the coverage branch November 8, 2025 16:51
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.

1 participant