Googletest export

Introduce GTEST_FLAG_GET and GTEST_FLAG_SET macros.

PiperOrigin-RevId: 382808313
This commit is contained in:
Abseil Team
2021-07-02 17:01:11 -04:00
committed by Derek Mauro
parent 4cfd14984f
commit 977cffc442
21 changed files with 469 additions and 487 deletions

View File

@@ -35,10 +35,6 @@
#include "gtest/gtest.h"
#include "src/gtest-internal-inl.h"
namespace testing {
GTEST_DECLARE_string_(filter);
}
namespace {
enum FailureType {
@@ -174,7 +170,7 @@ int main(int argc, char **argv) {
// Verifies that RUN_ALL_TESTS() doesn't do global set-up or
// tear-down when there is no test to run.
testing::GTEST_FLAG(filter) = "-*";
GTEST_FLAG_SET(filter, "-*");
Check(RunAllTests(env, NO_FAILURE) == 0,
"RUN_ALL_TESTS() should return zero, as there is no test to run.");
Check(!env->set_up_was_run(),