Googletest export
Internal change PiperOrigin-RevId: 405710296
This commit is contained in:
parent
489ef888d9
commit
b3062166a1
@ -394,7 +394,7 @@ TEST_F(LogIsVisibleTest, WorksWhenVerbosityIsWarning) {
|
|||||||
// and log severity.
|
// and log severity.
|
||||||
void TestLogWithSeverity(const std::string& verbosity, LogSeverity severity,
|
void TestLogWithSeverity(const std::string& verbosity, LogSeverity severity,
|
||||||
bool should_print) {
|
bool should_print) {
|
||||||
const std::string old_flag = GMOCK_FLAG(verbose);
|
const std::string old_flag = GMOCK_FLAG_GET(verbose);
|
||||||
GMOCK_FLAG_SET(verbose, verbosity);
|
GMOCK_FLAG_SET(verbose, verbosity);
|
||||||
CaptureStdout();
|
CaptureStdout();
|
||||||
Log(severity, "Test log.\n", 0);
|
Log(severity, "Test log.\n", 0);
|
||||||
@ -413,7 +413,7 @@ void TestLogWithSeverity(const std::string& verbosity, LogSeverity severity,
|
|||||||
// Tests that when the stack_frames_to_skip parameter is negative,
|
// Tests that when the stack_frames_to_skip parameter is negative,
|
||||||
// Log() doesn't include the stack trace in the output.
|
// Log() doesn't include the stack trace in the output.
|
||||||
TEST(LogTest, NoStackTraceWhenStackFramesToSkipIsNegative) {
|
TEST(LogTest, NoStackTraceWhenStackFramesToSkipIsNegative) {
|
||||||
const std::string saved_flag = GMOCK_FLAG(verbose);
|
const std::string saved_flag = GMOCK_FLAG_GET(verbose);
|
||||||
GMOCK_FLAG_SET(verbose, kInfoVerbosity);
|
GMOCK_FLAG_SET(verbose, kInfoVerbosity);
|
||||||
CaptureStdout();
|
CaptureStdout();
|
||||||
Log(kInfo, "Test log.\n", -1);
|
Log(kInfo, "Test log.\n", -1);
|
||||||
@ -499,7 +499,7 @@ TEST(LogTest, OnlyWarningsArePrintedWhenVerbosityIsInvalid) {
|
|||||||
// Verifies that Log() behaves correctly for the given verbosity level
|
// Verifies that Log() behaves correctly for the given verbosity level
|
||||||
// and log severity.
|
// and log severity.
|
||||||
std::string GrabOutput(void(*logger)(), const char* verbosity) {
|
std::string GrabOutput(void(*logger)(), const char* verbosity) {
|
||||||
const std::string saved_flag = GMOCK_FLAG(verbose);
|
const std::string saved_flag = GMOCK_FLAG_GET(verbose);
|
||||||
GMOCK_FLAG_SET(verbose, verbosity);
|
GMOCK_FLAG_SET(verbose, verbosity);
|
||||||
CaptureStdout();
|
CaptureStdout();
|
||||||
logger();
|
logger();
|
||||||
|
Loading…
Reference in New Issue
Block a user