Skip to content

Commit

Permalink
Add test for payable constructor in ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Aug 15, 2017
1 parent 12f3257 commit 1f5ab60
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions test/libsolidity/SolidityABIJSON.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,37 @@ BOOST_AUTO_TEST_CASE(constructor_abi)
checkInterface(sourceCode, interface);
}

BOOST_AUTO_TEST_CASE(payable_constructor_abi)
{
char const* sourceCode = R"(
contract test {
function test(uint param1, test param2, bool param3) payable {}
}
)";

char const* interface = R"([
{
"inputs": [
{
"name": "param1",
"type": "uint256"
},
{
"name": "param2",
"type": "address"
},
{
"name": "param3",
"type": "bool"
}
],
"payable": true,
"statemutability": "payable",
"type": "constructor"
}
])";
checkInterface(sourceCode, interface);
}

BOOST_AUTO_TEST_CASE(return_param_in_abi)
{
Expand Down

0 comments on commit 1f5ab60

Please sign in to comment.