Googletest export

Introduce GMOCK_FLAG_GET and GMOCK_FLAG_SET macros.

PiperOrigin-RevId: 396649214
This commit is contained in:
Abseil Team
2021-09-14 14:59:42 -04:00
committed by Derek Mauro
parent 159c9ad23e
commit 6202251f09
24 changed files with 151 additions and 3735 deletions

View File

@@ -132,10 +132,10 @@ static GTEST_DEFINE_STATIC_MUTEX_(g_log_mutex);
// Returns true if and only if a log with the given severity is visible
// according to the --gmock_verbose flag.
GTEST_API_ bool LogIsVisible(LogSeverity severity) {
if (GMOCK_FLAG(verbose) == kInfoVerbosity) {
if (GMOCK_FLAG_GET(verbose) == kInfoVerbosity) {
// Always show the log if --gmock_verbose=info.
return true;
} else if (GMOCK_FLAG(verbose) == kErrorVerbosity) {
} else if (GMOCK_FLAG_GET(verbose) == kErrorVerbosity) {
// Always hide it if --gmock_verbose=error.
return false;
} else {