MCPcopy Create free account
hub / github.com/apache/singa / PrintTo

Function PrintTo

test/gtest/gtest.h:9544–9568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9542// wants).
9543template <typename T>
9544void PrintTo(const T& value, ::std::ostream* os) {
9545 // DefaultPrintTo() is overloaded. The type of its first two
9546 // arguments determine which version will be picked. If T is an
9547 // STL-style container, the version for container will be called; if
9548 // T is a pointer, the pointer version will be called; otherwise the
9549 // generic version will be called.
9550 //
9551 // Note that we check for container types here, prior to we check
9552 // for protocol message types in our operator<<. The rationale is:
9553 //
9554 // For protocol messages, we want to give people a chance to
9555 // override Google Mock's format by defining a PrintTo() or
9556 // operator<<. For STL containers, other formats can be
9557 // incompatible with Google Mock's format for the container
9558 // elements; therefore we check for container types here to ensure
9559 // that our format is used.
9560 //
9561 // The second argument of DefaultPrintTo() is needed to bypass a bug
9562 // in Symbian's C++ compiler that prevents it from picking the right
9563 // overload between:
9564 //
9565 // PrintTo(const T& x, ...);
9566 // PrintTo(T* x, ...);
9567 DefaultPrintTo(IsContainerTest<T>(0), is_pointer<T>(), value, os);
9568}
9569
9570// The following list of PrintTo() overloads tells
9571// UniversalPrinter<T>::Print() how to print standard types (built-in

Callers 1

PrintMethod · 0.70

Calls 4

DefaultPrintToFunction · 0.85
PrintStringToFunction · 0.85
PrintWideStringToFunction · 0.85
PrintTupleToFunction · 0.85

Tested by

no test coverage detected