From 162d021c3faf0fdb671778870c9da8ad74256b2e Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 15 Oct 2015 16:27:26 +0200 Subject: some more style fixes --- test/libsolidity/SolidityParser.cpp | 8 ++++---- test/libsolidity/solidityExecutionFramework.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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 parseText(std::string const& _source, ErrorList& _errors) { ASTPointer sourceUnit = Parser(_errors).parse(std::make_shared(CharStream(_source))); - if(!sourceUnit) + if (!sourceUnit) return ASTPointer(); for (ASTPointer const& node: sourceUnit->nodes()) if (ASTPointer contract = dynamic_pointer_cast(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); } -- cgit v1.2.3