aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-03-13 19:30:56 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-03-13 19:30:56 +0800
commit7091b6c8b5a91a13ff02255cc0bca08266527e4f (patch)
tree73adb2c2b21783e92cad8a1cdb2bf40a7a01d402
parent3232561d979954f0625102d33cf042fc5eda7211 (diff)
downloaddexon-solidity-7091b6c8b5a91a13ff02255cc0bca08266527e4f.tar.gz
dexon-solidity-7091b6c8b5a91a13ff02255cc0bca08266527e4f.tar.zst
dexon-solidity-7091b6c8b5a91a13ff02255cc0bca08266527e4f.zip
Minor adjustments.
-rw-r--r--test/libsolidity/SyntaxTest.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/libsolidity/SyntaxTest.cpp b/test/libsolidity/SyntaxTest.cpp
index 8cbe2f36..f1c60458 100644
--- a/test/libsolidity/SyntaxTest.cpp
+++ b/test/libsolidity/SyntaxTest.cpp
@@ -48,7 +48,7 @@ SyntaxTest::SyntaxTest(string const& _filename)
{
ifstream file(_filename);
if (!file)
- BOOST_THROW_EXCEPTION(runtime_error("cannot open test contract: \"" + _filename + "\""));
+ BOOST_THROW_EXCEPTION(runtime_error("Cannot open test contract: \"" + _filename + "\"."));
file.exceptions(ios::badbit);
m_source = parseSource(file);
@@ -60,7 +60,7 @@ bool SyntaxTest::run(ostream& _stream, string const& _indent)
m_errorList = parseAnalyseAndReturnError(m_source, true, true, true).second;
if (!matchesExpectations(m_errorList))
{
- std::string nextIndentLevel = _indent.empty() ? "\t" : _indent + _indent;
+ std::string nextIndentLevel = _indent + "\t";
_stream << _indent << "Expected result:" << endl;
printExpected(_stream, nextIndentLevel);
_stream << _indent << "Obtained result:\n";
@@ -99,8 +99,8 @@ bool SyntaxTest::matchesExpectations(ErrorList const& _errorList) const
else
for (size_t i = 0; i < _errorList.size(); i++)
if (
- !(_errorList[i]->typeName() == m_expectations[i].type) ||
- !(errorMessage(*_errorList[i]) == m_expectations[i].message)
+ (_errorList[i]->typeName() != m_expectations[i].type) ||
+ (errorMessage(*_errorList[i]) != m_expectations[i].message)
)
return false;
return true;