aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'SolidityEndToEndTest.cpp')
-rw-r--r--SolidityEndToEndTest.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp
index 9a04e02d..ced9785e 100644
--- a/SolidityEndToEndTest.cpp
+++ b/SolidityEndToEndTest.cpp
@@ -885,7 +885,7 @@ BOOST_AUTO_TEST_CASE(constructor)
BOOST_AUTO_TEST_CASE(simple_accessor)
{
char const* sourceCode = "contract test {\n"
- " uint256 data;\n"
+ " uint256 public data;\n"
" function test() {\n"
" data = 8;\n"
" }\n"
@@ -897,10 +897,10 @@ BOOST_AUTO_TEST_CASE(simple_accessor)
BOOST_AUTO_TEST_CASE(multiple_elementary_accessors)
{
char const* sourceCode = "contract test {\n"
- " uint256 data;\n"
- " string6 name;\n"
- " hash a_hash;\n"
- " address an_address;\n"
+ " uint256 public data;\n"
+ " string6 public name;\n"
+ " hash public a_hash;\n"
+ " address public an_address;\n"
" function test() {\n"
" data = 8;\n"
" name = \"Celina\";\n"
@@ -908,7 +908,6 @@ BOOST_AUTO_TEST_CASE(multiple_elementary_accessors)
" an_address = address(0x1337);\n"
" super_secret_data = 42;\n"
" }\n"
- " private:"
" uint256 super_secret_data;"
"}\n";
compileAndRun(sourceCode);
@@ -1511,8 +1510,7 @@ BOOST_AUTO_TEST_CASE(functions_called_by_constructor)
setName("abc");
}
function getName() returns (string3 ret) { return name; }
- private:
- function setName(string3 _name) { name = _name; }
+ function setName(string3 _name) private { name = _name; }
})";
compileAndRun(sourceCode);
BOOST_REQUIRE(callContractFunction("getName()") == encodeArgs("abc"));