EVM Code for simple accessor function is properly generated

This commit is contained in:
Lefteris Karapetsas 2015-01-27 16:55:06 +01:00
parent cc906541f6
commit ebafd05580

View File

@ -882,6 +882,18 @@ BOOST_AUTO_TEST_CASE(constructor)
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)
{
char const* sourceCode = "contract test {\n"