@@ -83,9 +83,9 @@ TestCase::TestResult CommonSyntaxTest::conclude(ostream& _stream, string const&
83
83
void CommonSyntaxTest::printExpectationAndError (ostream& _stream, string const & _linePrefix, bool _formatted)
84
84
{
85
85
string nextIndentLevel = _linePrefix + " " ;
86
- AnsiColorized (_stream, _formatted, {BOLD, CYAN}) << _linePrefix << " Expected result:" << endl;
86
+ util:: AnsiColorized (_stream, _formatted, {BOLD, CYAN}) << _linePrefix << " Expected result:" << endl;
87
87
printErrorList (_stream, m_expectations, nextIndentLevel, _formatted);
88
- AnsiColorized (_stream, _formatted, {BOLD, CYAN}) << _linePrefix << " Obtained result:" << endl;
88
+ util:: AnsiColorized (_stream, _formatted, {BOLD, CYAN}) << _linePrefix << " Obtained result:" << endl;
89
89
printErrorList (_stream, m_errorList, nextIndentLevel, _formatted);
90
90
}
91
91
@@ -104,8 +104,8 @@ void CommonSyntaxTest::printSource(ostream& _stream, string const& _linePrefix,
104
104
continue ;
105
105
106
106
if (outputSourceNames)
107
- _stream << _linePrefix << formatting::CYAN << " ==== Source: " << name << " ====" << formatting::RESET << endl;
108
- vector<char const *> sourceFormatting (source.length (), formatting::RESET);
107
+ _stream << _linePrefix << util:: formatting::CYAN << " ==== Source: " << name << " ====" << util:: formatting::RESET << endl;
108
+ vector<char const *> sourceFormatting (source.length (), util:: formatting::RESET);
109
109
for (auto const & error: m_errorList)
110
110
if (error.sourceName == name && error.locationStart >= 0 && error.locationEnd >= 0 )
111
111
{
@@ -115,11 +115,11 @@ void CommonSyntaxTest::printSource(ostream& _stream, string const& _linePrefix,
115
115
for (int i = error.locationStart ; i < error.locationEnd ; i++)
116
116
if (isWarning)
117
117
{
118
- if (sourceFormatting[static_cast <size_t >(i)] == formatting::RESET)
119
- sourceFormatting[static_cast <size_t >(i)] = formatting::ORANGE_BACKGROUND_256;
118
+ if (sourceFormatting[static_cast <size_t >(i)] == util:: formatting::RESET)
119
+ sourceFormatting[static_cast <size_t >(i)] = util:: formatting::ORANGE_BACKGROUND_256;
120
120
}
121
121
else
122
- sourceFormatting[static_cast <size_t >(i)] = formatting::RED_BACKGROUND;
122
+ sourceFormatting[static_cast <size_t >(i)] = util:: formatting::RED_BACKGROUND;
123
123
}
124
124
125
125
_stream << _linePrefix << sourceFormatting.front () << source.front ();
@@ -131,12 +131,12 @@ void CommonSyntaxTest::printSource(ostream& _stream, string const& _linePrefix,
131
131
_stream << source[i];
132
132
else
133
133
{
134
- _stream << formatting::RESET << endl;
134
+ _stream << util:: formatting::RESET << endl;
135
135
if (i + 1 < source.length ())
136
136
_stream << _linePrefix << sourceFormatting[i];
137
137
}
138
138
}
139
- _stream << formatting::RESET;
139
+ _stream << util:: formatting::RESET;
140
140
}
141
141
else
142
142
{
@@ -157,12 +157,12 @@ void CommonSyntaxTest::printErrorList(
157
157
)
158
158
{
159
159
if (_errorList.empty ())
160
- AnsiColorized (_stream, _formatted, {BOLD, GREEN}) << _linePrefix << " Success" << endl;
160
+ util:: AnsiColorized (_stream, _formatted, {BOLD, GREEN}) << _linePrefix << " Success" << endl;
161
161
else
162
162
for (auto const & error: _errorList)
163
163
{
164
164
{
165
- AnsiColorized scope (_stream, _formatted, {BOLD, (error.type == " Warning" ) ? YELLOW : RED});
165
+ util:: AnsiColorized scope (_stream, _formatted, {BOLD, (error.type == " Warning" ) ? YELLOW : RED});
166
166
_stream << _linePrefix << error.type ;
167
167
if (error.errorId .has_value ())
168
168
_stream << ' ' << error.errorId ->error ;
@@ -184,7 +184,7 @@ void CommonSyntaxTest::printErrorList(
184
184
}
185
185
}
186
186
187
- string CommonSyntaxTest::errorMessage (Exception const & _e)
187
+ string CommonSyntaxTest::errorMessage (util:: Exception const & _e)
188
188
{
189
189
if (_e.comment () && !_e.comment ()->empty ())
190
190
return boost::replace_all_copy (*_e.comment (), " \n " , " \\ n" );
0 commit comments