aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityParser.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-10-15 22:27:26 +0800
committerLianaHus <liana@ethdev.com>2015-10-15 22:27:26 +0800
commit162d021c3faf0fdb671778870c9da8ad74256b2e (patch)
tree9840b1b5db02ee4d1df5f09e98b4ee1de12ce730 /test/libsolidity/SolidityParser.cpp
parent3871e77946866cdef36147ddd2e6d322f63cea37 (diff)
downloaddexon-solidity-162d021c3faf0fdb671778870c9da8ad74256b2e.tar.gz
dexon-solidity-162d021c3faf0fdb671778870c9da8ad74256b2e.tar.zst
dexon-solidity-162d021c3faf0fdb671778870c9da8ad74256b2e.zip
some more style fixes
Diffstat (limited to 'test/libsolidity/SolidityParser.cpp')
-rw-r--r--test/libsolidity/SolidityParser.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp
index 2482acff..35393811 100644
--- a/test/libsolidity/SolidityParser.cpp
+++ b/test/libsolidity/SolidityParser.cpp
@@ -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 {