llvm-project/llvm/utils/unittest/googletest/include/gtest/internal
Sam McCall 2d8242d60d [gtest] Support raw_ostream printing functions more comprehensively.
Summary:
These are functions like operator<<(raw_ostream&, Foo).

Previously these were only supported for messages. In the assertion
  EXPECT_EQ(A, B) << C;
the local modifications would explicitly try to use raw_ostream printing for C.
However A and B would look for a std::ostream printing function, and often fall
back to gtest's default "168 byte object <00 01 FE 42 ...>".

This patch pulls out the raw_ostream support into a new header under `custom/`.

I changed the mechanism: instead of a convertible stream, we wrap the printed
value in a proxy object to allow it to be sent to a std::ostream.
I think the new way is clearer.

I also changed the policy: we prefer raw_ostream printers over std::ostream
ones. This is because the fallback printers are defined using std::ostream,
while all the raw_ostream printers should be "good".

Reviewers: ilya-biryukov, chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D43091

llvm-svn: 324876
2018-02-12 10:20:09 +00:00
..
custom [gtest] Support raw_ostream printing functions more comprehensively. 2018-02-12 10:20:09 +00:00
gtest-death-test-internal.h
gtest-filepath.h Fix typos of occurred and occurrence 2018-01-24 10:33:39 +00:00
gtest-internal.h
gtest-linked_ptr.h
gtest-param-util-generated.h
gtest-param-util.h
gtest-port-arch.h Add NetBSD to the list of platforms supporting death tests. Two unit 2017-05-05 17:57:45 +00:00
gtest-port.h Add NetBSD to the list of platforms supporting death tests. Two unit 2017-05-05 17:57:45 +00:00
gtest-string.h
gtest-tuple.h
gtest-type-util.h