Skip to content

Commit 842f25c

Browse files
committed
test: add a minimum initial supply to avoid division by zero
1 parent 034c558 commit 842f25c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/unit/CloneERC20Votes.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ contract CloneERC20VotesTest is Test {
7979
string memory tokenURI,
8080
uint256 seed
8181
) public {
82-
vm.assume(initialSupply > 0);
82+
vm.assume(initialSupply > MIN_INITIAL_SUPPLY);
8383
vm.assume(initialSupply < type(uint256).max / MAX_TOTAL_PRE_MINT_WAD);
8484
vm.assume(yearlyMintRate <= MAX_YEARLY_MINT_RATE_WAD);
8585

@@ -169,7 +169,7 @@ contract CloneERC20VotesTest is Test {
169169
function testFuzz_initialize_RevertsWhenMaxPreMintPerAddressExceeded(
170170
uint256 initialSupply
171171
) public {
172-
vm.assume(initialSupply > 0);
172+
vm.assume(initialSupply > MIN_INITIAL_SUPPLY);
173173
vm.assume(initialSupply < type(uint256).max / MAX_TOTAL_PRE_MINT_WAD);
174174

175175
address[] memory recipients = new address[](1);

0 commit comments

Comments
 (0)