diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-27 23:55:06 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-29 04:46:16 +0800 |
commit | ebafd05580705679c4744ad79201e584560f20b6 (patch) | |
tree | 96c2395278056bd3fd7e805f978992d511f73b41 | |
parent | cc906541f61ce6d90797338848fe2870da42a490 (diff) | |
download | dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.tar dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.tar.gz dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.tar.bz2 dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.tar.lz dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.tar.xz dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.tar.zst dexon-solidity-ebafd05580705679c4744ad79201e584560f20b6.zip |
EVM Code for simple accessor function is properly generated
-rw-r--r-- | SolidityEndToEndTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index 6c7b7502..65a77a54 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -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" |