diff options
Diffstat (limited to 'test/gmock_test.cc')
-rw-r--r-- | test/gmock_test.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/gmock_test.cc b/test/gmock_test.cc index 63c3fe8d..0c832607 100644 --- a/test/gmock_test.cc +++ b/test/gmock_test.cc @@ -246,3 +246,10 @@ TEST(WideInitGoogleMockTest, CallsInitGoogleTest) { TestInitGoogleMock(argv, new_argv, "error"); EXPECT_EQ(old_init_gtest_count + 1, g_init_gtest_count); } + +// Makes sure Google Mock flags can be accessed in code. +TEST(FlagTest, IsAccessibleInCode) { + bool dummy = testing::GMOCK_FLAG(catch_leaked_mocks) && + testing::GMOCK_FLAG(verbose) == ""; + dummy = dummy; // Avoids the "unused local variable" warning. +} |