mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
updated unit test
This commit is contained in:
parent
ccc3d56542
commit
23925040a1
@ -499,8 +499,7 @@ BOOST_AUTO_TEST_CASE(constructor_abi)
|
|||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
contract test {
|
contract test {
|
||||||
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
function test(uint param1, test param2, bool param3) {}
|
||||||
function test(uint param1, test param2, bool param3, ActionChoices param4) {}
|
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
@ -518,10 +517,6 @@ BOOST_AUTO_TEST_CASE(constructor_abi)
|
|||||||
{
|
{
|
||||||
"name": "param3",
|
"name": "param3",
|
||||||
"type": "bool"
|
"type": "bool"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "param4",
|
|
||||||
"type": "uint8"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "constructor"
|
"type": "constructor"
|
||||||
@ -545,29 +540,31 @@ BOOST_AUTO_TEST_CASE(return_param_in_abi)
|
|||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
|
|
||||||
char const* interface = R"([
|
char const* interface = R"(
|
||||||
{
|
[
|
||||||
"constant" : false,
|
{
|
||||||
"inputs" : [],
|
"constant" : false,
|
||||||
"name" : "ret",
|
"inputs" : [],
|
||||||
"outputs" : [
|
"name" : "ret",
|
||||||
{
|
"outputs" : [
|
||||||
"name" : "",
|
{
|
||||||
"type" : "uint8"
|
"name" : "",
|
||||||
}
|
"type" : "uint8"
|
||||||
],
|
}
|
||||||
"type" : "function"
|
],
|
||||||
},
|
"type" : "function"
|
||||||
{
|
},
|
||||||
"inputs": [
|
{
|
||||||
{
|
"inputs": [
|
||||||
"name": "param",
|
{
|
||||||
"type": "uint8"
|
"name": "param",
|
||||||
}
|
"type": "uint8"
|
||||||
],
|
}
|
||||||
"type": "constructor"
|
],
|
||||||
}
|
"type": "constructor"
|
||||||
])";
|
}
|
||||||
|
]
|
||||||
|
)";
|
||||||
checkInterface(sourceCode, interface);
|
checkInterface(sourceCode, interface);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +516,7 @@ BOOST_AUTO_TEST_CASE(enum_external_type)
|
|||||||
contract Test {
|
contract Test {
|
||||||
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
||||||
function boo(ActionChoices enumArg) external returns (uint ret) {
|
function boo(ActionChoices enumArg) external returns (uint ret) {
|
||||||
ret = 5;
|
ret = 5;
|
||||||
}
|
}
|
||||||
})";
|
})";
|
||||||
ETH_TEST_REQUIRE_NO_THROW(sourceUnit = parseTextAndResolveNames(text), "Parsing and name Resolving failed");
|
ETH_TEST_REQUIRE_NO_THROW(sourceUnit = parseTextAndResolveNames(text), "Parsing and name Resolving failed");
|
||||||
|
Loading…
Reference in New Issue
Block a user