mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests for recursion in JULIA.
This commit is contained in:
parent
f874fc28d1
commit
97cb571ba4
@ -237,6 +237,18 @@ BOOST_AUTO_TEST_CASE(builtin_types)
|
||||
BOOST_CHECK(successParse("{ let x:s256 := 1:s256 }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(recursion_depth)
|
||||
{
|
||||
string input;
|
||||
for (size_t i = 0; i < 20000; i++)
|
||||
input += "{";
|
||||
input += "let x:u256 := 0:u256";
|
||||
for (size_t i = 0; i < 20000; i++)
|
||||
input += "}";
|
||||
|
||||
CHECK_ERROR(input, ParserError, "recursio");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
@ -400,6 +400,20 @@ BOOST_AUTO_TEST_CASE(instruction_too_many_arguments)
|
||||
CHECK_PARSE_ERROR("{ mul(1, 2, 3) }", ParserError, "Expected ')' (\"mul\" expects 2 arguments)");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(recursion_depth)
|
||||
{
|
||||
string input;
|
||||
for (size_t i = 0; i < 20000; i++)
|
||||
input += "{";
|
||||
input += "let x := 0";
|
||||
for (size_t i = 0; i < 20000; i++)
|
||||
input += "}";
|
||||
|
||||
CHECK_PARSE_ERROR(input, ParserError, "recursion");
|
||||
}
|
||||
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(Printing)
|
||||
|
Loading…
Reference in New Issue
Block a user