forked from aragon/aragon-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apps: Use shared TimeHelpersMock for tests (aragon#786)
- Loading branch information
1 parent
9272c33
commit 102c0e8
Showing
15 changed files
with
176 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module.exports = { | ||
norpc: true, | ||
copyPackages: ['@aragon/os', '@aragon/apps-vault'], | ||
copyPackages: ['@aragon/os', '@aragon/apps-vault', '@aragon/test-helpers'], | ||
skipFiles: [ | ||
'test', | ||
'@aragon/test-helpers/contracts/TimeHelpersMock.sol', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
pragma solidity 0.4.24; | ||
|
||
import "../../Finance.sol"; | ||
import "@aragon/test-helpers/contracts/TimeHelpersMock.sol"; | ||
|
||
|
||
contract FinanceMock is Finance { | ||
uint64 mockTime; | ||
contract FinanceMock is Finance, TimeHelpersMock { | ||
uint64 mockMaxPeriodTransitions = MAX_UINT64; | ||
|
||
function getMaxUint64() public pure returns (uint64) { return MAX_UINT64; } | ||
|
||
function mock_setMaxPeriodTransitions(uint64 i) public { mockMaxPeriodTransitions = i; } | ||
function mock_setTimestamp(uint64 i) public { mockTime = i; } | ||
|
||
function getMaxPeriodTransitions() internal view returns (uint64) { return mockMaxPeriodTransitions; } | ||
function getTimestamp64() internal view returns (uint64) { return mockTime; } | ||
|
||
function getMaxUint64() public pure returns (uint64) { return MAX_UINT64; } | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module.exports = { | ||
norpc: true, | ||
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime'], | ||
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime', '@aragon/test-helpers'], | ||
skipFiles: [ | ||
'test', | ||
'@aragon/test-helpers/contracts/TimeHelpersMock.sol', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module.exports = { | ||
norpc: true, | ||
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime'], | ||
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime', '@aragon/test-helpers'], | ||
skipFiles: [ | ||
'test', | ||
'@aragon/test-helpers/contracts/TimeHelpersMock.sol', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
pragma solidity 0.4.24; | ||
|
||
import "../../TokenManager.sol"; | ||
import "@aragon/test-helpers/contracts/TimeHelpersMock.sol"; | ||
|
||
|
||
contract TokenManagerMock is TokenManager { | ||
uint256 mockTime; | ||
|
||
function mock_setTimestamp(uint256 i) public { mockTime = i; } | ||
function getTimestamp() internal view returns (uint256) { return mockTime; } | ||
} | ||
/* solium-disable-next-line no-empty-blocks */ | ||
contract TokenManagerMock is TokenManager, TimeHelpersMock {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module.exports = { | ||
norpc: true, | ||
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime'], | ||
copyPackages: ['@aragon/os', '@aragon/apps-shared-minime', '@aragon/test-helpers'], | ||
skipFiles: [ | ||
'test', | ||
'@aragon/test-helpers/contracts/TimeHelpersMock.sol', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
module.exports = { | ||
norpc: true, | ||
copyPackages: ['@aragon/os', '@aragon/apps-finance', '@aragon/apps-vault'], | ||
copyPackages: ['@aragon/os', '@aragon/apps-finance', '@aragon/apps-vault', '@aragon/test-helpers'], | ||
skipFiles: [ | ||
'test', | ||
'@aragon/test-helpers/contracts/TimeHelpersMock.sol', | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters