diff options
author | LianaHus <liana@ethdev.com> | 2015-10-15 22:27:26 +0800 |
---|---|---|
committer | LianaHus <liana@ethdev.com> | 2015-10-15 22:27:26 +0800 |
commit | 162d021c3faf0fdb671778870c9da8ad74256b2e (patch) | |
tree | 9840b1b5db02ee4d1df5f09e98b4ee1de12ce730 /test/libsolidity | |
parent | 3871e77946866cdef36147ddd2e6d322f63cea37 (diff) | |
download | dexon-solidity-162d021c3faf0fdb671778870c9da8ad74256b2e.tar.gz dexon-solidity-162d021c3faf0fdb671778870c9da8ad74256b2e.tar.zst dexon-solidity-162d021c3faf0fdb671778870c9da8ad74256b2e.zip |
some more style fixes
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityParser.cpp | 8 | ||||
-rw-r--r-- | test/libsolidity/solidityExecutionFramework.h | 4 |
2 files changed, 6 insertions, 6 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 { diff --git a/test/libsolidity/solidityExecutionFramework.h b/test/libsolidity/solidityExecutionFramework.h index 27dd4fb7..82fede84 100644 --- a/test/libsolidity/solidityExecutionFramework.h +++ b/test/libsolidity/solidityExecutionFramework.h @@ -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); } |