mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
InlineAssembly: Extracting function expression tests
This commit is contained in:
parent
616f03f577
commit
671b1c950e
@ -203,31 +203,6 @@ BOOST_AUTO_TEST_CASE(constants)
|
||||
BOOST_CHECK(successParse("{ pop(mul(7, 8)) }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(functional)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ let x := 2 x := add(add(7, mul(6, x)), mul(7, 8)) }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(functional_partial)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ let x := byte }", ParserError, "Expected '(' but got '}'");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(functional_partial_success)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ let x := byte(1, 2) }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(functional_assignment)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ let x := 2 x := 7 }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(functional_assignment_complex)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ let x := 2 x := add(add(7, mul(6, x)), mul(7, 8)) }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(for_statement)
|
||||
{
|
||||
BOOST_CHECK(successParse("{ for {} 1 {} {} }"));
|
||||
@ -572,13 +547,6 @@ BOOST_AUTO_TEST_CASE(returndatacopy)
|
||||
BOOST_CHECK(successAssemble("{ returndatacopy(0, 32, 64) }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(returndatacopy_functional)
|
||||
{
|
||||
if (!solidity::test::CommonOptions::get().evmVersion().supportsReturndata())
|
||||
return;
|
||||
BOOST_CHECK(successAssemble("{ returndatacopy(0, 32, 64) }"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(staticcall)
|
||||
{
|
||||
if (!solidity::test::CommonOptions::get().evmVersion().hasStaticCall())
|
||||
|
3
test/libyul/yulSyntaxTests/functional.yul
Normal file
3
test/libyul/yulSyntaxTests/functional.yul
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
let x := 2 x := add(add(7, mul(6, x)), mul(7, 8))
|
||||
}
|
3
test/libyul/yulSyntaxTests/functional_assign_complex.yul
Normal file
3
test/libyul/yulSyntaxTests/functional_assign_complex.yul
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
let x := 2 x := add(add(7, mul(6, x)), mul(7, 8))
|
||||
}
|
5
test/libyul/yulSyntaxTests/functional_assignment.yul
Normal file
5
test/libyul/yulSyntaxTests/functional_assignment.yul
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
let x := 2
|
||||
x := 7
|
||||
}
|
||||
|
5
test/libyul/yulSyntaxTests/functional_partial.yul
Normal file
5
test/libyul/yulSyntaxTests/functional_partial.yul
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
let x := byte
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (20-21): Expected '(' but got '}'
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
let x := byte(1, 2)
|
||||
}
|
5
test/libyul/yulSyntaxTests/functional_returndatacopy.yul
Normal file
5
test/libyul/yulSyntaxTests/functional_returndatacopy.yul
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
returndatacopy(0, 32, 64)
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >=byzantium
|
Loading…
Reference in New Issue
Block a user