@@ -84,15 +84,15 @@ bool SemanticTest::run(ostream& _stream, string const& _linePrefix, bool const _
84
84
FormattedScope (_stream, _formatted, {BOLD, CYAN}) << _linePrefix << " Expected result:" << endl;
85
85
for (auto const & test: m_tests)
86
86
{
87
- printFunctionCall (_stream, test.call , _linePrefix);
88
- printFunctionCallTest (_stream, test, true , _linePrefix, _formatted);
87
+ printFunctionCallHighlighted (_stream, test.call , _linePrefix);
88
+ printFunctionCallTestHighlighted (_stream, test, true , _linePrefix, _formatted);
89
89
}
90
90
91
91
FormattedScope (_stream, _formatted, {BOLD, CYAN}) << _linePrefix << " Obtained result:" << endl;
92
92
for (auto const & test: m_tests)
93
93
{
94
- printFunctionCall (_stream, test.call , _linePrefix);
95
- printFunctionCallTest (_stream, test, false , _linePrefix, _formatted);
94
+ printFunctionCallHighlighted (_stream, test.call , _linePrefix);
95
+ printFunctionCallTestHighlighted (_stream, test, false , _linePrefix, _formatted);
96
96
}
97
97
return false ;
98
98
}
@@ -111,8 +111,8 @@ void SemanticTest::printUpdatedExpectations(ostream& _stream, string const& _lin
111
111
{
112
112
for (auto const & test: m_tests)
113
113
{
114
- printFunctionCall (_stream, test.call , _linePrefix);
115
- printFunctionCallTest (_stream, test, false , _linePrefix);
114
+ printFunctionCallHighlighted (_stream, test.call , _linePrefix);
115
+ printFunctionCallTestHighlighted (_stream, test, false , _linePrefix);
116
116
}
117
117
}
118
118
@@ -121,16 +121,16 @@ void SemanticTest::parseExpectations(istream& _stream)
121
121
{
122
122
TestFileParser parser{_stream};
123
123
for (auto const & call: parser.parseFunctionCalls ())
124
- m_tests.emplace_back (FunctionCallTest{std::move ( call), false , bytes{}, string{}});
124
+ m_tests.emplace_back (FunctionCallTest{call, bytes{}, string{}});
125
125
}
126
126
127
127
bool SemanticTest::deploy (string const & _contractName, u256 const & _value, bytes const & _arguments)
128
128
{
129
- auto output = compileAndRunWithoutCheck (m_source, _value, _contractName, _arguments, m_libraryAddresses );
129
+ auto output = compileAndRunWithoutCheck (m_source, _value, _contractName, _arguments);
130
130
return !output.empty () && m_transactionSuccessful;
131
131
}
132
132
133
- void SemanticTest::printFunctionCall (ostream& _stream, FunctionCall const & _call, string const & _linePrefix) const
133
+ void SemanticTest::printFunctionCallHighlighted (ostream& _stream, FunctionCall const & _call, string const & _linePrefix) const
134
134
{
135
135
_stream << _linePrefix << _call.signature ;
136
136
if (_call.value > u256 (0 ))
@@ -142,18 +142,18 @@ void SemanticTest::printFunctionCall(ostream& _stream, FunctionCall const& _call
142
142
_stream << endl;
143
143
}
144
144
145
- void SemanticTest::printFunctionCallTest (
145
+ void SemanticTest::printFunctionCallTestHighlighted (
146
146
ostream& _stream,
147
147
FunctionCallTest const & _test,
148
- bool _expected ,
148
+ bool _printExcepted ,
149
149
string const & _linePrefix,
150
150
bool const _formatted
151
151
) const
152
152
{
153
153
_stream << _linePrefix;
154
154
if (_formatted && !_test.matchesExpectation ())
155
155
_stream << formatting::RED_BACKGROUND;
156
- string output = _expected ? _test.call .expectations .output : _test.output ;
156
+ string output = _printExcepted ? _test.call .expectations .output : _test.output ;
157
157
_stream << boost::algorithm::trim_copy (output);
158
158
if (_formatted && !_test.matchesExpectation ())
159
159
_stream << formatting::RESET;
0 commit comments