Files
openzeppelin-contracts/contracts/mocks/Failer.sol
Nicolás Venturo f0e12d5301 ether and shouldFail tests (#1513)
* Added ether tests.

* Added shouldFail base function and tests.

* Updated test descriptions.

* Reduced gas limit on out-of-gas tests.
2018-11-27 17:20:21 -03:00

23 lines
394 B
Solidity

pragma solidity ^0.4.24;
contract Failer {
uint256[] private array;
function dontFail() public pure {
}
function failWithRevert() public pure {
revert();
}
function failWithThrow() public pure {
assert(false);
}
function failWithOutOfGas() public {
for (uint256 i = 0; i < 2**200; ++i) {
array.push(i);
}
}
}