Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
fixed test_RevertsIf_MismatchedArrayLength
Browse files Browse the repository at this point in the history
  • Loading branch information
dd0sxx committed Dec 4, 2023
1 parent 1975c88 commit 629c064
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/llama-scripts/LlamaGovernanceScript.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,12 @@ contract Aggregate is LlamaGovernanceScriptTest {
mpCore.executeAction(actionInfo);
}

function test_RevertsIf_MismatchedArrayLength(address[] calldata _targets, bytes[] calldata _calls) public {
vm.assume(targets.length != calls.length);
function test_RevertsIf_MismatchedArrayLength(address[] calldata _targets, uint8 length) public {
vm.assume(targets.length != length);
bytes[] memory _calls = new bytes[](length);
for (uint256 i = 0; i < length; i++) {
_calls[i] = abi.encodeWithSelector(LlamaPolicy.initializeRole.selector, "test");
}
bytes memory data = abi.encodeWithSelector(AGGREGATE_SELECTOR, _targets, _calls);
(ActionInfo memory actionInfo) = _createAction(data);

Expand Down

0 comments on commit 629c064

Please sign in to comment.