aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-23 20:45:50 +0800
committerchriseth <c@ethdev.com>2015-04-23 21:00:44 +0800
commitb4d2ead1b86623c2b1ecf60d0c42a4c9e39f8789 (patch)
tree5a34db657100cbeea5c5ed6943ecf881d0ec6876 /libsolidity
parentfcb772293bcc07f1723c39fa24da14cb5280e78e (diff)
downloaddexon-solidity-b4d2ead1b86623c2b1ecf60d0c42a4c9e39f8789.tar.gz
dexon-solidity-b4d2ead1b86623c2b1ecf60d0c42a4c9e39f8789.tar.zst
dexon-solidity-b4d2ead1b86623c2b1ecf60d0c42a4c9e39f8789.zip
Use non-implemented functions for solidity interface output.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/SolidityInterface.cpp12
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))}));