From 7f757884c5a04484820a97e592afae74beff95a9 Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Wed, 23 Nov 2016 13:13:38 +0100 Subject: Clang: Extend clang query It's a first step to introduce clang query. Change-Id: I4d001a8883f56066765ce6bc561fa3f49611c0a4 Reviewed-by: Tim Jenssen --- .../clangbackendipc/sourcerangewithtextcontainer.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp') diff --git a/src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp b/src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp index a418af0488..2be07150da 100644 --- a/src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp +++ b/src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp @@ -25,6 +25,10 @@ #include "sourcerangewithtextcontainer.h" +#ifdef UNIT_TESTS +#include +#endif + namespace ClangBackEnd { QDebug operator<<(QDebug debug, const SourceRangeWithTextContainer &container) @@ -40,12 +44,18 @@ QDebug operator<<(QDebug debug, const SourceRangeWithTextContainer &container) void PrintTo(const SourceRangeWithTextContainer &container, ::std::ostream* os) { + Q_UNUSED(container) + Q_UNUSED(os) +#ifdef UNIT_TESTS *os << "((" << container.start().line() << ", " - << container.start().column() << "), (" + << container.start().column() << ", " + << container.start().offset() << "), (" << container.end().line() << ", " << container.end().column() << ", " - << "\"" << container.text() << "\"" - << "))"; + << container.end().offset() << "), " + << testing::PrintToString(container.text()) + << ")"; +#endif } } // namespace ClangBackEnd -- cgit v1.2.1