Skip to content

Instantly share code, notes, and snippets.

@iisaint
Created August 7, 2017 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iisaint/9187246fbf97cd1f7e9acd9b022cf55e to your computer and use it in GitHub Desktop.
Save iisaint/9187246fbf97cd1f7e9acd9b022cf55e to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.13;
import '../../contracts/PushButton.sol';
// @dev PushButtonMock mocks current block number
contract PushButtonMock is PushButton {
uint mock_blockNumber = 1;
function PushButtonMock () PushButton() {
}
function getBlock() constant returns (uint) {
return mock_blockNumber;
}
function setMockedBlockNumber(uint _b) {
mock_blockNumber = _b;
}
}
Copy link

ghost commented Jun 24, 2018

Hello, thanks for you tutorial. But when I run the truffle test, it always return error

/D/gitRepositories/truffle/push-button/test/helpers/TestPushButtonMock.sol:11:31: TypeError: Referenced declaration is neither modifier nor base class.
function PushButtonMocks () PushButton() {
^----------^
Compilation failed. See above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment