From 893f4cf092c98d13116741d1ebc19846f6873536 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Wed, 11 Jul 2018 15:57:07 +0200 Subject: Specifies visibility in unit tests. --- test/libsolidity/SolidityABIJSON.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/libsolidity/SolidityABIJSON.cpp') diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index e3e06ddd..d4b355c7 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(multiple_params) BOOST_AUTO_TEST_CASE(multiple_methods_order) { - // methods are expected to be in alphabetical order + // methods are expected to be in alpabetical order char const* sourceCode = R"( contract test { function f(uint a) public returns (uint d) { return a * 7; } @@ -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"( -- cgit v1.2.3 From ed2aa3b8694f253edff8c0a4acefd4ba74bbd859 Mon Sep 17 00:00:00 2001 From: Erik Kundt Date: Mon, 16 Jul 2018 12:23:06 +0200 Subject: Fixes end-to-end tests. --- test/libsolidity/SolidityABIJSON.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/libsolidity/SolidityABIJSON.cpp') diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index d4b355c7..14413ca0 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -199,7 +199,7 @@ BOOST_AUTO_TEST_CASE(multiple_params) BOOST_AUTO_TEST_CASE(multiple_methods_order) { - // methods are expected to be in alpabetical order + // methods are expected to be in alphabetical order char const* sourceCode = R"( contract test { function f(uint a) public returns (uint d) { return a * 7; } -- cgit v1.2.3