solidity/test/libsolidity/semanticTests/state/block_timestamp.sol
Alex Beregszaszi f9d6abf69b Add more tests for state access (block, msg, tx, etc.)
Move some of them out of SolidityEndToEndTests. Additionally this ensures the deterministic values of the testing infrastructure.
2020-12-09 20:46:01 +00:00

13 lines
318 B
Solidity

contract C {
constructor() {}
function f() public returns (uint) {
return block.timestamp;
}
}
// ====
// compileViaYul: also
// ----
// constructor() # This is the 1st block #
// f() -> 0x1e # This is the 2nd block (each block is "15 seconds") #
// f() -> 0x2d # This is the 3rd block #