Skip to content

test: add ConsumableUnitsLib tests#1061

Open
prd-carapulse[bot] wants to merge 1 commit into
mainfrom
hermes/consumable-units-tests
Open

test: add ConsumableUnitsLib tests#1061
prd-carapulse[bot] wants to merge 1 commit into
mainfrom
hermes/consumable-units-tests

Conversation

@prd-carapulse

@prd-carapulse prd-carapulse Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Adds focused Foundry coverage for ConsumableUnitsLib using the real Midnight contract for consumed() and settlementFee().

Covers:

  • maxUnits remaining units
  • maxUnits zero-floor saturation
  • maxAssets buy-offer conversion from remaining buyerAssets
  • maxAssets sell-offer conversion from remaining sellerAssets
  • maxAssets zero-floor saturation

Verification:

  • forge fmt --check test/ConsumableUnitsLibTest.sol
  • forge test --match-contract ConsumableUnitsLibTest

Note: full forge test still fails locally on existing suites with EvmError/Revert/NotActivated failures unrelated to this new test file.

Requested by: @Mathis (Slack)

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.

0 participants