diff options
author | chriseth <chris@ethereum.org> | 2018-07-16 21:46:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-16 21:46:40 +0800 |
commit | b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4 (patch) | |
tree | 7eb6a360a07db75166459ae5160fc350109329ac /test/libsolidity/SolidityABIJSON.cpp | |
parent | 931794001e92cbfe99c91da037cf36a1808d9df1 (diff) | |
parent | ed2aa3b8694f253edff8c0a4acefd4ba74bbd859 (diff) | |
download | dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.tar dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.tar.gz dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.tar.bz2 dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.tar.lz dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.tar.xz dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.tar.zst dexon-solidity-b38c26bb0cbbb7fe80c99fc757cb6150c61a56b4.zip |
Merge pull request #4482 from ethereum/enforceVisibilitySpecifierTests
Enforce visibility specifier in tests
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r-- | test/libsolidity/SolidityABIJSON.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index e3e06ddd..14413ca0 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -256,7 +256,7 @@ BOOST_AUTO_TEST_CASE(view_function) char const* sourceCode = R"( contract test { function foo(uint a, uint b) public returns (uint d) { return a + b; } - function boo(uint32 a) view returns(uint b) { return a * 4; } + function boo(uint32 a) public view returns(uint b) { return a * 4; } } )"; @@ -311,7 +311,7 @@ BOOST_AUTO_TEST_CASE(pure_function) char const* sourceCode = R"( contract test { function foo(uint a, uint b) public returns (uint d) { return a + b; } - function boo(uint32 a) pure returns(uint b) { return a * 4; } + function boo(uint32 a) public pure returns (uint b) { return a * 4; } } )"; @@ -616,7 +616,7 @@ BOOST_AUTO_TEST_CASE(constructor_abi) { char const* sourceCode = R"( contract test { - constructor(uint param1, test param2, bool param3) {} + constructor(uint param1, test param2, bool param3) public {} } )"; @@ -648,7 +648,7 @@ BOOST_AUTO_TEST_CASE(payable_constructor_abi) { char const* sourceCode = R"( contract test { - constructor(uint param1, test param2, bool param3) payable {} + constructor(uint param1, test param2, bool param3) public payable {} } )"; @@ -682,7 +682,7 @@ BOOST_AUTO_TEST_CASE(return_param_in_abi) char const* sourceCode = R"( contract test { enum ActionChoices { GoLeft, GoRight, GoStraight, Sit } - constructor(ActionChoices param) {} + constructor(ActionChoices param) public {} function ret() public returns (ActionChoices) { ActionChoices action = ActionChoices.GoLeft; return action; @@ -807,8 +807,8 @@ BOOST_AUTO_TEST_CASE(payable_function) { char const* sourceCode = R"( contract test { - function f() {} - function g() payable {} + function f() public {} + function g() public payable {} } )"; @@ -861,7 +861,7 @@ BOOST_AUTO_TEST_CASE(function_type) { char const* sourceCode = R"( contract test { - function g(function(uint) external returns (uint) x) {} + function g(function(uint) external returns (uint) x) public {} } )"; @@ -1041,8 +1041,8 @@ BOOST_AUTO_TEST_CASE(structs_in_libraries) library L { struct S { uint a; T[] sub; bytes b; } struct T { uint[2] x; } - function f(L.S storage s) {} - function g(L.S memory s) {} + function f(L.S storage s) public {} + function g(L.S memory s) public {} } )"; char const* interface = R"( |