aboutsummaryrefslogtreecommitdiffstats
path: root/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorGav Wood <i@gavwood.com>2015-02-04 00:50:39 +0800
committerGav Wood <i@gavwood.com>2015-02-04 00:50:39 +0800
commitd5b2f8a2ce5170f3832c816e20f87557ed196a74 (patch)
tree1d85fd941c363a560880e29f0e2313114f253b4b /SolidityEndToEndTest.cpp
parent74e7e3eaf98f67122c05b74a84b3c0078606335b (diff)
parenta38b8890bda78559cdf43a657c987eaf2153d87a (diff)
downloaddexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.tar
dexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.tar.gz
dexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.tar.bz2
dexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.tar.lz
dexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.tar.xz
dexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.tar.zst
dexon-solidity-d5b2f8a2ce5170f3832c816e20f87557ed196a74.zip
Merge branch 'sol_visibility' of https://github.com/chriseth/cpp-ethereum into chriseth-sol_visibility
Conflicts: test/SolidityNameAndTypeResolution.cpp
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"));