Increase test coverage (#1237)
* Fixed a SplitPayment test * Deleted unnecessary function. * Improved PostDeliveryCrowdsale tests. * Improved RefundableCrowdsale tests. * Improved MintedCrowdsale tests. * Improved IncreasingPriceCrowdsale tests. * Fixed a CappedCrowdsale test. * Improved TimedCrowdsale tests. * Improved descriptions of added tests.
This commit is contained in:
committed by
Francisco Giordano
parent
a466e76d26
commit
a9f910d34f
@ -22,8 +22,8 @@ contract IncreasingPriceCrowdsale is TimedCrowdsale {
|
||||
* @param _finalRate Number of tokens a buyer gets per wei at the end of the crowdsale
|
||||
*/
|
||||
constructor(uint256 _initialRate, uint256 _finalRate) public {
|
||||
require(_initialRate >= _finalRate);
|
||||
require(_finalRate > 0);
|
||||
require(_initialRate >= _finalRate);
|
||||
initialRate = _initialRate;
|
||||
finalRate = _finalRate;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ contract Heritable is Ownable {
|
||||
* before the heir can take ownership.
|
||||
*/
|
||||
constructor(uint256 _heartbeatTimeout) public {
|
||||
setHeartbeatTimeout(_heartbeatTimeout);
|
||||
heartbeatTimeout_ = _heartbeatTimeout;
|
||||
}
|
||||
|
||||
function setHeir(address _newHeir) public onlyOwner {
|
||||
@ -113,13 +113,6 @@ contract Heritable is Ownable {
|
||||
timeOfDeath_ = 0;
|
||||
}
|
||||
|
||||
function setHeartbeatTimeout(uint256 _newHeartbeatTimeout)
|
||||
internal onlyOwner
|
||||
{
|
||||
require(ownerLives());
|
||||
heartbeatTimeout_ = _newHeartbeatTimeout;
|
||||
}
|
||||
|
||||
function ownerLives() internal view returns (bool) {
|
||||
return timeOfDeath_ == 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user