Commit bf0d0a44 authored by zhanyong.wan's avatar zhanyong.wan
Browse files

Turns --gmock_catch_leaked_mocks on by default.

parent df35a763
......@@ -37,9 +37,7 @@ namespace testing {
// TODO(wan@google.com): support using environment variables to
// control the flag values, like what Google Test does.
// TODO(wan@google.com): change the default value to true after people
// have a chance to fix their leaked mocks.
GMOCK_DEFINE_bool_(catch_leaked_mocks, false,
GMOCK_DEFINE_bool_(catch_leaked_mocks, true,
"true iff Google Mock should report leaked mock objects "
"as failures.");
......
......@@ -55,9 +55,9 @@ TEST_MULTIPLE_LEAKS = PROGRAM_PATH + ' --gtest_filter=*MultipleLeaked*'
class GMockLeakTest(unittest.TestCase):
def testDoesNotCatchLeakedMockByDefault(self):
self.assertEquals(0, os.system(TEST_WITH_EXPECT_CALL))
self.assertEquals(0, os.system(TEST_WITH_ON_CALL))
def testCatchesLeakedMockByDefault(self):
self.assertNotEqual(os.system(TEST_WITH_EXPECT_CALL), 0)
self.assertNotEqual(os.system(TEST_WITH_ON_CALL), 0)
def testDoesNotCatchLeakedMockWhenDisabled(self):
self.assertEquals(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment