some more style fixes

This commit is contained in:
LianaHus
2015-10-15 16:27:26 +02:00
parent 3871e77946
commit 162d021c3f
7 changed files with 14 additions and 27 deletions
+4 -4
View File
@@ -42,7 +42,7 @@ namespace
ASTPointer<ContractDefinition> parseText(std::string const& _source, ErrorList& _errors)
{
ASTPointer<SourceUnit> sourceUnit = Parser(_errors).parse(std::make_shared<Scanner>(CharStream(_source)));
if(!sourceUnit)
if (!sourceUnit)
return ASTPointer<ContractDefinition>();
for (ASTPointer<ASTNode> const& node: sourceUnit->nodes())
if (ASTPointer<ContractDefinition> contract = dynamic_pointer_cast<ContractDefinition>(node))
@@ -57,7 +57,7 @@ bool successParse(std::string const& _source)
try
{
auto sourceUnit = parseText(_source, errors);
if(!sourceUnit)
if (!sourceUnit)
return false;
}
catch (FatalError const& _exception)
@@ -68,6 +68,7 @@ bool successParse(std::string const& _source)
if (Error::containsErrorOfType(errors, Error::Type::ParserError))
return false;
BOOST_CHECK(Error::containsOnlyWarnings(errors));
return true;
}
@@ -168,7 +169,6 @@ BOOST_AUTO_TEST_CASE(two_exact_functions)
// with support of overloaded functions, during parsing,
// we can't determine whether they match exactly, however
// it will throw DeclarationError in following stage.
// TODO add test to the SolidityNameAndTypeDeclaration
BOOST_CHECK(successParse(text));
}
@@ -848,7 +848,7 @@ BOOST_AUTO_TEST_CASE(external_variable)
BOOST_CHECK(!successParse(text));
}
BOOST_AUTO_TEST_CASE(arrays_in_storagze)
BOOST_AUTO_TEST_CASE(arrays_in_storage)
{
char const* text = R"(
contract c {
@@ -77,12 +77,12 @@ public:
m_compiler.compile(m_optimize, m_optimizeRuns);
BOOST_REQUIRE(Error::containsErrorOfType(m_compiler.errors(), _type));
}
catch(Error const& _e)
catch (Error const& _e)
{
BOOST_REQUIRE(_e.type() == _type);
foundError = true;
}
catch(Exception const& _exception)
catch (Exception const& _exception)
{
BOOST_REQUIRE(false);
}