UnitTests: Refactor printing

Move standard printing functions to extra header.

Change-Id: Ib032047235297dfe3ac0bcdbd39c353493f3ae0d
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2020-06-10 13:50:35 +02:00
committed by Tim Jenssen
parent 5a7a6cb02d
commit 50d3067bcd
8 changed files with 50 additions and 21 deletions

View File

@@ -350,24 +350,4 @@ std::ostream &operator<<(std::ostream &out, const Diagnostic &diag);
} // namespace Internal
} // namespace CppTools
namespace std {
template<typename T>
ostream &operator<<(ostream &out, const vector<T> &vector)
{
out << "[";
for (auto current = vector.begin(); current != vector.end(); ++current) {
out << *current;
if (std::next(current) != vector.end())
out << ", ";
}
out << "]";
return out;
}
} // namespace std
void setFilePathCache(ClangBackEnd::FilePathCaching *filePathCache);