Adds parsing sub-directory in syntaxTests and moves two example tests from SolidityParser.cpp to test contracts.

This commit is contained in:
Daniel Kirchner 2018-04-03 14:41:53 +02:00
parent 6f9644add1
commit 87ad337ae0
3 changed files with 9 additions and 20 deletions

View File

@ -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"(

View File

@ -0,0 +1,5 @@
contract test {
uint256 ;
}
// ----
// ParserError: Expected identifier, got 'Semicolon'

View File

@ -0,0 +1,4 @@
contract test {
uint256 stateVariable1;
}
// ----