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:
22
contracts/mocks/Failer.sol
Normal file
22
contracts/mocks/Failer.sol
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user