diff options
author | chriseth <c@ethdev.com> | 2015-04-24 17:59:05 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-04-24 17:59:05 +0800 |
commit | b129a201dbc7c7b8370f47af758e295e173b4e78 (patch) | |
tree | 5a34db657100cbeea5c5ed6943ecf881d0ec6876 | |
parent | 658ee79da21a0d27bec8fa43937d9a47a74fadba (diff) | |
parent | b4d2ead1b86623c2b1ecf60d0c42a4c9e39f8789 (diff) | |
download | dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.tar dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.tar.gz dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.tar.bz2 dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.tar.lz dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.tar.xz dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.tar.zst dexon-solidity-b129a201dbc7c7b8370f47af758e295e173b4e78.zip |
Merge pull request #1729 from chriseth/sol_interfaceOutput
Use non-implemented functions for solidity interface output.
-rw-r--r-- | libsolidity/SolidityInterface.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libsolidity/SolidityInterface.cpp b/libsolidity/SolidityInterface.cpp index c8f74e3a..9c9373f0 100644 --- a/libsolidity/SolidityInterface.cpp +++ b/libsolidity/SolidityInterface.cpp @@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE(single_function) "}\n"); BOOST_REQUIRE_EQUAL(1, contract.getDefinedFunctions().size()); BOOST_CHECK_EQUAL(getSourcePart(*contract.getDefinedFunctions().front()), - "function f(uint256 a)returns(uint256 d){}"); + "function f(uint256 a)returns(uint256 d);"); } BOOST_AUTO_TEST_CASE(single_constant_function) @@ -87,7 +87,7 @@ BOOST_AUTO_TEST_CASE(single_constant_function) "contract test { function f(uint a) constant returns(bytes1 x) { 1==2; } }"); BOOST_REQUIRE_EQUAL(1, contract.getDefinedFunctions().size()); BOOST_CHECK_EQUAL(getSourcePart(*contract.getDefinedFunctions().front()), - "function f(uint256 a)constant returns(bytes1 x){}"); + "function f(uint256 a)constant returns(bytes1 x);"); } BOOST_AUTO_TEST_CASE(multiple_functions) @@ -97,8 +97,8 @@ BOOST_AUTO_TEST_CASE(multiple_functions) " function g(uint b) returns(uint e) { return b * 8; }\n" "}\n"; ContractDefinition const& contract = checkInterface(sourceCode); - set<string> expectation({"function f(uint256 a)returns(uint256 d){}", - "function g(uint256 b)returns(uint256 e){}"}); + set<string> expectation({"function f(uint256 a)returns(uint256 d);", + "function g(uint256 b)returns(uint256 e);"}); BOOST_REQUIRE_EQUAL(2, contract.getDefinedFunctions().size()); BOOST_CHECK(expectation == set<string>({getSourcePart(*contract.getDefinedFunctions().at(0)), getSourcePart(*contract.getDefinedFunctions().at(1))})); @@ -135,8 +135,8 @@ BOOST_AUTO_TEST_CASE(inheritance) " event derivedEvent(uint indexed evtArgDerived); \n" " }"; ContractDefinition const& contract = checkInterface(sourceCode); - set<string> expectedFunctions({"function baseFunction(uint256 p)returns(uint256 i){}", - "function derivedFunction(bytes32 p)returns(bytes32 i){}"}); + set<string> expectedFunctions({"function baseFunction(uint256 p)returns(uint256 i);", + "function derivedFunction(bytes32 p)returns(bytes32 i);"}); BOOST_REQUIRE_EQUAL(2, contract.getDefinedFunctions().size()); BOOST_CHECK(expectedFunctions == set<string>({getSourcePart(*contract.getDefinedFunctions().at(0)), getSourcePart(*contract.getDefinedFunctions().at(1))})); |