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.
This commit is contained in:
Nicolás Venturo
2018-11-27 17:20:21 -03:00
committed by GitHub
parent 21ed6bee25
commit f0e12d5301
4 changed files with 146 additions and 7 deletions

View File

@ -0,0 +1,22 @@
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);
}
}
}