mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
test: add a test for #621
This commit is contained in:
parent
a40dcfef12
commit
33590d513e
@ -6353,6 +6353,20 @@ BOOST_AUTO_TEST_CASE(decayed_tuple)
|
|||||||
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2)));
|
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(inline_tuple_with_rational_numbers)
|
||||||
|
{
|
||||||
|
char const* sourceCode = R"(
|
||||||
|
contract c {
|
||||||
|
function f() returns (int8) {
|
||||||
|
int8[5] memory foo3 = [int8(1), -1, 0, 0, 0];
|
||||||
|
return foo3[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
compileAndRun(sourceCode);
|
||||||
|
BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(1)));
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(destructuring_assignment)
|
BOOST_AUTO_TEST_CASE(destructuring_assignment)
|
||||||
{
|
{
|
||||||
char const* sourceCode = R"(
|
char const* sourceCode = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user