class ScopedTrace
Defined at line 2071 of file ../../third_party/googletest/src/googletest/include/gtest/gtest.h
Causes a trace (including the given source file path and line number,
and the given message) to be included in every test failure message generated
by code in the scope of the lifetime of an instance of this class. The effect
is undone with the destruction of the instance.
The message argument can be anything streamable to std::ostream.
Example:
testing::ScopedTrace trace("file.cc", 123, "message");
Public Methods
template <typename T>
void ScopedTrace (const char * file, int line, const T & message)
Template version. Uses Message() to convert the values into strings.
Slow, but flexible.
Defined at line 2079 of file ../../third_party/googletest/src/googletest/include/gtest/gtest.h
void ScopedTrace (const char * file, int line, const char * message)
Optimize for some known types.
Defined at line 2084 of file ../../third_party/googletest/src/googletest/include/gtest/gtest.h
void ScopedTrace (const char * file, int line, const std::string & message)
Defined at line 2088 of file ../../third_party/googletest/src/googletest/include/gtest/gtest.h
void ~ScopedTrace ()
The d'tor pops the info pushed by the c'tor.
Note that the d'tor is not virtual in order to be efficient.
Don't inherit from ScopedTrace!