diff options
author | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-11 19:30:46 +0800 |
---|---|---|
committer | Daniel Kirchner <daniel@ekpyron.org> | 2018-07-12 18:54:42 +0800 |
commit | 899efd5e64ea90cb44b21d49c0fe0a230732fcb8 (patch) | |
tree | 79888183961f51833a5ac8b1022701f513b9e723 /test | |
parent | 8b4b8bdbae2f67445178ebe3b12d23bb4f46f9d2 (diff) | |
download | dexon-solidity-899efd5e64ea90cb44b21d49c0fe0a230732fcb8.tar.gz dexon-solidity-899efd5e64ea90cb44b21d49c0fe0a230732fcb8.tar.zst dexon-solidity-899efd5e64ea90cb44b21d49c0fe0a230732fcb8.zip |
Update compilation tests wrt requiring storage locations.
Diffstat (limited to 'test')
4 files changed, 12 insertions, 12 deletions
diff --git a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol index 6b10f17e..c2a6c3ef 100644 --- a/test/compilationTests/MultiSigWallet/MultiSigWallet.sol +++ b/test/compilationTests/MultiSigWallet/MultiSigWallet.sol @@ -225,7 +225,7 @@ contract MultiSigWallet { notExecuted(transactionId) { if (isConfirmed(transactionId)) { - Transaction tx = transactions[transactionId]; + Transaction storage tx = transactions[transactionId]; tx.executed = true; if (tx.destination.call.value(tx.value)(tx.data)) emit Execution(transactionId); diff --git a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol index 3a68f662..c1b1d7ea 100644 --- a/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol +++ b/test/compilationTests/MultiSigWallet/MultiSigWalletWithDailyLimit.sol @@ -42,7 +42,7 @@ contract MultiSigWalletWithDailyLimit is MultiSigWallet { public notExecuted(transactionId) { - Transaction tx = transactions[transactionId]; + Transaction storage tx = transactions[transactionId]; bool confirmed = isConfirmed(transactionId); if (confirmed || tx.data.length == 0 && isUnderLimit(tx.value)) { tx.executed = true; diff --git a/test/compilationTests/milestonetracker/MilestoneTracker.sol b/test/compilationTests/milestonetracker/MilestoneTracker.sol index fc7008cd..bc182f9d 100644 --- a/test/compilationTests/milestonetracker/MilestoneTracker.sol +++ b/test/compilationTests/milestonetracker/MilestoneTracker.sol @@ -227,7 +227,7 @@ contract MilestoneTracker { RLP.RLPItem memory itmProposal = itrProposals.next(); - Milestone milestone = milestones[milestones.length ++]; + Milestone storage milestone = milestones[milestones.length ++]; if (!itmProposal.isList()) throw; @@ -259,7 +259,7 @@ contract MilestoneTracker { public campaignNotCanceled notChanging { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; if ( (msg.sender != milestone.milestoneLeadLink) &&(msg.sender != recipient)) throw; @@ -277,7 +277,7 @@ contract MilestoneTracker { public campaignNotCanceled notChanging { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; if ((msg.sender != milestone.reviewer) || (milestone.status != MilestoneStatus.Completed)) throw; @@ -292,7 +292,7 @@ contract MilestoneTracker { public campaignNotCanceled notChanging { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; if ((msg.sender != milestone.reviewer) || (milestone.status != MilestoneStatus.Completed)) throw; @@ -307,7 +307,7 @@ contract MilestoneTracker { function requestMilestonePayment(uint _idMilestone ) public campaignNotCanceled notChanging { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; if ( (msg.sender != milestone.milestoneLeadLink) &&(msg.sender != recipient)) throw; @@ -324,7 +324,7 @@ contract MilestoneTracker { public onlyRecipient campaignNotCanceled notChanging { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; if ((milestone.status != MilestoneStatus.AcceptedAndInProgress) && (milestone.status != MilestoneStatus.Completed)) throw; @@ -339,7 +339,7 @@ contract MilestoneTracker { function arbitrateApproveMilestone(uint _idMilestone ) public onlyArbitrator campaignNotCanceled notChanging { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; if ((milestone.status != MilestoneStatus.AcceptedAndInProgress) && (milestone.status != MilestoneStatus.Completed)) throw; @@ -356,7 +356,7 @@ contract MilestoneTracker { // @dev This internal function is executed when the milestone is paid out function authorizePayment(uint _idMilestone) internal { if (_idMilestone >= milestones.length) throw; - Milestone milestone = milestones[_idMilestone]; + Milestone storage milestone = milestones[_idMilestone]; // Recheck again to not pay twice if (milestone.status == MilestoneStatus.AuthorizedForPayment) throw; milestone.status = MilestoneStatus.AuthorizedForPayment; diff --git a/test/compilationTests/zeppelin/token/VestedToken.sol b/test/compilationTests/zeppelin/token/VestedToken.sol index 893a51db..48818c3f 100644 --- a/test/compilationTests/zeppelin/token/VestedToken.sol +++ b/test/compilationTests/zeppelin/token/VestedToken.sol @@ -74,7 +74,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * @param _grantId The id of the token grant. */ function revokeTokenGrant(address _holder, uint256 _grantId) public { - TokenGrant grant = grants[_holder][_grantId]; + TokenGrant storage grant = grants[_holder][_grantId]; if (!grant.revokable) { // Check if grant was revokable throw; @@ -193,7 +193,7 @@ contract VestedToken is StandardToken, LimitedTransferToken { * revokability, burnsOnRevoke, and vesting) plus the vested value at the current time. */ function tokenGrant(address _holder, uint256 _grantId) public view returns (address granter, uint256 value, uint256 vested, uint64 start, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke) { - TokenGrant grant = grants[_holder][_grantId]; + TokenGrant storage grant = grants[_holder][_grantId]; granter = grant.granter; value = grant.value; |