Skip to content

Commit

Permalink
check edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
arr00 committed Feb 15, 2024
1 parent 24752c8 commit c153ed7
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/proposals/ProposalExecutionEngineIntrinsicPower.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,45 @@ import { ProposalExecutionEngine } from "contracts/proposals/ProposalExecutionEn
contract ProposalExecutionEngineIntrinsicVotingPowerTest is SetupPartyHelper {
constructor() SetupPartyHelper(false) {}

function testIntrinsicVotingPowerAt_inactiveAddress() public {
skip(10);

assertEq(
ProposalExecutionEngine(address(party)).getIntrinsicVotingPowerAt(
_randomAddress(),
uint40(block.timestamp),
0
),
0
);
}

function testIntrinsicVotingPowerAt_timestampBeforeActive() public {
uint40 firstTimestamp = uint40(block.timestamp);
skip(100);

address newUser = _randomAddress();
party.mint(newUser, 100, newUser);
skip(100);

assertEq(
ProposalExecutionEngine(address(party)).getIntrinsicVotingPowerAt(
newUser,
firstTimestamp,
0
),
0
);
assertEq(
ProposalExecutionEngine(address(party)).getIntrinsicVotingPowerAt(
newUser,
uint40(block.timestamp),
100
),
0
);
}

/// @notice All hints are correct
function testIntrinsicVotingPowerAt_simpleTest() public {
skip(10);
Expand Down

0 comments on commit c153ed7

Please sign in to comment.