Skip to content

Commit 4106d8d

Browse files
committed
fix: broken tests out of enum bounds
1 parent 9634d2d commit 4106d8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/contracts-bedrock/test/governance/ProposalValidator.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ contract ProposalValidator_SubmitFundingProposal_TestFail is ProposalValidator_I
10991099

11001100
function testFuzz_submitFundingProposal_invalidProposalType_reverts(uint8 proposalTypeValue) public {
11011101
// Valid funding proposal types are GovernanceFund (3) and CouncilBudget (4)
1102-
vm.assume(proposalTypeValue != 3 && proposalTypeValue != 4);
1102+
proposalTypeValue = uint8(bound(proposalTypeValue, 0, 2));
11031103
ProposalValidator.ProposalType proposalType = ProposalValidator.ProposalType(proposalTypeValue);
11041104

11051105
(string[] memory descriptions, address[] memory recipients, uint256[] memory amounts) =
@@ -1849,7 +1849,7 @@ contract ProposalValidator_SubmitUpgradeProposal_TestFail is ProposalValidator_I
18491849

18501850
function testFuzz_submitUpgradeProposal_invalidProposalType_reverts(uint8 proposalTypeValue) public {
18511851
// Valid upgrade proposal types are ProtocolOrGovernorUpgrade (0) and MaintenanceUpgrade (1)
1852-
vm.assume(proposalTypeValue != 0 && proposalTypeValue != 1);
1852+
proposalTypeValue = uint8(bound(proposalTypeValue, 2, 4));
18531853
ProposalValidator.ProposalType proposalType = ProposalValidator.ProposalType(proposalTypeValue);
18541854

18551855
uint248 againstThreshold = 5000; // 50%

0 commit comments

Comments
 (0)