diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2016-11-23 13:13:38 +0100 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2016-11-23 12:16:04 +0000 |
commit | 7f757884c5a04484820a97e592afae74beff95a9 (patch) | |
tree | d5066d8a24965523b5024ba37d210c74cd68446c /src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp | |
parent | 52fc4a4ebdc840cc351a0ed465a6523d5bc53ac2 (diff) | |
download | qt-creator-7f757884c5a04484820a97e592afae74beff95a9.tar.gz |
Clang: Extend clang query
It's a first step to introduce clang query.
Change-Id: I4d001a8883f56066765ce6bc561fa3f49611c0a4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp')
-rw-r--r-- | src/libs/clangbackendipc/sourcerangewithtextcontainer.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
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 <gtest/gtest.h> +#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 |