Skip to content

Commit

Permalink
remove fuzz tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinGreen committed Dec 12, 2023
1 parent 305b046 commit d64badb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
1 change: 0 additions & 1 deletion test/accounts/LlamaAccountWithDelegation.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {DeployUtils} from "script/DeployUtils.sol";
import {ILlamaAccount} from "src/interfaces/ILlamaAccount.sol";
import {LlamaAccount} from "src/accounts/LlamaAccount.sol";
import {LlamaAccountWithDelegation} from "src/accounts/LlamaAccountWithDelegation.sol";
import {LlamaUtils} from "src/lib/LlamaUtils.sol";
import {Roles, LlamaTestSetup} from "test/utils/LlamaTestSetup.sol";
import {ActionInfo, PermissionData} from "src/lib/Structs.sol";

Expand Down
20 changes: 11 additions & 9 deletions test/llama-scripts/LlamaAccountTokenDelegationScript.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ contract DelegateTokenFromAccount is LlamaAccountTokenDelegationScriptTest {
assertEq(IVotes(address(UNI)).delegates(address(mpAccount1)), address(mpExecutor));
}

function test_TokensDelegatedToAnyAddress(address delegatee) external {
function test_TokensDelegatedToOtherAddress() external {
address delegatee = makeAddr("scriptDelegatee");
// Assert that the account has 1,000 UNI tokens and hasn't delegated them yet
assertEq(UNI.balanceOf(address(mpAccount1)), 1000e18);
assertEq(IVotes(address(UNI)).delegates(address(mpAccount1)), address(0));
Expand Down Expand Up @@ -146,7 +147,9 @@ contract DelegateTokensFromAccount is LlamaAccountTokenDelegationScriptTest {
mpCore.executeAction(actionInfo);
}

function test_DelegateTokensFromAccounts(address delegatee1, address delegatee2) external {
function test_DelegateTokensFromAccounts() external {
address delegatee1 = makeAddr("scriptDelegate1");
address delegatee2 = makeAddr("scriptDelegate2");
// Assert that the accounts have 1,000 UNI tokens and hasn't delegated them yet
assertEq(UNI.balanceOf(address(mpAccount1)), 1000e18);
assertEq(UNI.balanceOf(address(mpAccount2)), 1000e18);
Expand All @@ -156,13 +159,12 @@ contract DelegateTokensFromAccount is LlamaAccountTokenDelegationScriptTest {
LlamaAccountTokenDelegationScript.AccountTokenDelegateData[] memory tokenDelegateData =
new LlamaAccountTokenDelegationScript.AccountTokenDelegateData[](2);

for (uint256 i = 0; i < 2; LlamaUtils.uncheckedIncrement(i)) {
tokenDelegateData[i] = LlamaAccountTokenDelegationScript.AccountTokenDelegateData(
LlamaAccount(payable(address(i % 2 == 0 ? mpAccount1 : mpAccount2))),
IVotes(address(UNI)),
i % 2 == 0 ? delegatee1 : delegatee2
);
}
tokenDelegateData[0] = LlamaAccountTokenDelegationScript.AccountTokenDelegateData(
LlamaAccount(payable(address(mpAccount1))), IVotes(address(UNI)), delegatee1
);
tokenDelegateData[1] = LlamaAccountTokenDelegationScript.AccountTokenDelegateData(
LlamaAccount(payable(address(mpAccount2))), IVotes(address(UNI)), delegatee2
);

executeDelegateTokensAction(tokenDelegateData);

Expand Down

0 comments on commit d64badb

Please sign in to comment.