mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds parsing sub-directory in syntaxTests and moves two example tests from SolidityParser.cpp to test contracts.
This commit is contained in:
parent
6f9644add1
commit
87ad337ae0
@ -112,26 +112,6 @@ while(0)
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(SolidityParser)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(smoke_test)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
uint256 stateVariable1;
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK(successParse(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(missing_variable_name_in_declaration)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
uint256 ;
|
||||
}
|
||||
)";
|
||||
CHECK_PARSE_ERROR(text, "Expected identifier");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(empty_function)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
@ -0,0 +1,5 @@
|
||||
contract test {
|
||||
uint256 ;
|
||||
}
|
||||
// ----
|
||||
// ParserError: Expected identifier, got 'Semicolon'
|
4
test/libsolidity/syntaxTests/parsing/smoke_test.sol
Normal file
4
test/libsolidity/syntaxTests/parsing/smoke_test.sol
Normal file
@ -0,0 +1,4 @@
|
||||
contract test {
|
||||
uint256 stateVariable1;
|
||||
}
|
||||
// ----
|
Loading…
Reference in New Issue
Block a user