mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
EVM Code for simple accessor function is properly generated
This commit is contained in:
parent
cc906541f6
commit
ebafd05580
@ -882,6 +882,18 @@ BOOST_AUTO_TEST_CASE(constructor)
|
|||||||
testSolidityAgainstCpp("get(uint256)", get, u256(7));
|
testSolidityAgainstCpp("get(uint256)", get, u256(7));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(simple_accessor)
|
||||||
|
{
|
||||||
|
char const* sourceCode = "contract test {\n"
|
||||||
|
" uint256 data;\n"
|
||||||
|
" function test() {\n"
|
||||||
|
" data = 8;\n"
|
||||||
|
" }\n"
|
||||||
|
"}\n";
|
||||||
|
compileAndRun(sourceCode);
|
||||||
|
BOOST_CHECK(callContractFunction("data()") == encodeArgs(8));
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(balance)
|
BOOST_AUTO_TEST_CASE(balance)
|
||||||
{
|
{
|
||||||
char const* sourceCode = "contract test {\n"
|
char const* sourceCode = "contract test {\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user