aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-03-15 23:27:34 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-03-15 23:27:54 +0800
commit50ad89d369a3ffd90471b2738f2f30491841e197 (patch)
tree99dfc6bcf6f916db5d5e823c98f98926a0ddc6f2 /test
parent7fa892eca93cc1b3fd75eb9341c11f0a471970d9 (diff)
downloaddexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.tar
dexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.tar.gz
dexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.tar.bz2
dexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.tar.lz
dexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.tar.xz
dexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.tar.zst
dexon-solidity-50ad89d369a3ffd90471b2738f2f30491841e197.zip
Only colour error type, not error message in isoltest.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SyntaxTest.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/test/libsolidity/SyntaxTest.cpp b/test/libsolidity/SyntaxTest.cpp
index 70abac48..acfdff29 100644
--- a/test/libsolidity/SyntaxTest.cpp
+++ b/test/libsolidity/SyntaxTest.cpp
@@ -78,8 +78,11 @@ void SyntaxTest::printExpected(ostream& _stream, string const& _linePrefix, bool
FormattedScope(_stream, _formatted, {BOLD, GREEN}) << _linePrefix << "Success" << endl;
else
for (auto const& expectation: m_expectations)
+ {
FormattedScope(_stream, _formatted, {BOLD, expectation.type == "Warning" ? YELLOW : RED}) <<
- _linePrefix << expectation.type << ": " << expectation.message << endl;
+ _linePrefix << expectation.type << ": ";
+ _stream << expectation.message << endl;
+ }
}
void SyntaxTest::printErrorList(
@@ -99,17 +102,20 @@ void SyntaxTest::printErrorList(
bool isWarning = (error->type() == Error::Type::Warning);
if (isWarning && _ignoreWarnings) continue;
- FormattedScope scope(_stream, _formatted, {BOLD, isWarning ? YELLOW : RED});
- _stream << _linePrefix;
- if (_lineNumbers)
{
- int line = offsetToLineNumber(
- boost::get_error_info<errinfo_sourceLocation>(*error)->start
- );
- if (line >= 0)
- _stream << "(" << line << "): ";
+ FormattedScope scope(_stream, _formatted, {BOLD, isWarning ? YELLOW : RED});
+ _stream << _linePrefix;
+ if (_lineNumbers)
+ {
+ int line = offsetToLineNumber(
+ boost::get_error_info<errinfo_sourceLocation>(*error)->start
+ );
+ if (line >= 0)
+ _stream << "(" << line << "): ";
+ }
+ _stream << error->typeName() << ": ";
}
- _stream << error->typeName() << ": " << errorMessage(*error) << endl;
+ _stream << errorMessage(*error) << endl;
}
}