mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add failing test
This commit is contained in:
parent
80f6a13d65
commit
14cdb76e4b
@ -0,0 +1,23 @@
|
|||||||
|
contract Test {
|
||||||
|
uint256 x;
|
||||||
|
|
||||||
|
function test() public returns (uint256) {
|
||||||
|
uint256 a = myGetX();
|
||||||
|
x = 5;
|
||||||
|
uint256 b = myGetX();
|
||||||
|
assembly {
|
||||||
|
log0(0, 64)
|
||||||
|
}
|
||||||
|
return a + b + myGetX();
|
||||||
|
}
|
||||||
|
|
||||||
|
function myGetX() internal view returns (uint256) {
|
||||||
|
assembly {
|
||||||
|
mstore(1, 0x123456789abcdef)
|
||||||
|
}
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// test() -> 10
|
||||||
|
// ~ emit <anonymous>: 0x0123456789abcd, 0xef00000000000000000000000000000000000000000000000000000000000000
|
Loading…
Reference in New Issue
Block a user