41using ::testing::Return;
45 virtual ~FooInterface() {}
46 virtual void DoThis() = 0;
49class MockFoo :
public FooInterface {
59TEST(LeakTest, LeakedMockWithExpectCallCausesFailureWhenLeakCheckingIsEnabled) {
60 MockFoo*
foo =
new MockFoo;
72TEST(LeakTest, LeakedMockWithOnCallCausesFailureWhenLeakCheckingIsEnabled) {
73 MockFoo*
foo =
new MockFoo;
75 ON_CALL(*
foo, DoThis()).WillByDefault(Return());
84TEST(LeakTest, CatchesMultipleLeakedMockObjects) {
85 MockFoo* foo1 =
new MockFoo;
86 MockFoo* foo2 =
new MockFoo;
88 ON_CALL(*foo1, DoThis()).WillByDefault(Return());
#define MOCK_METHOD0(m,...)
#define EXPECT_CALL(obj, call)
#define ON_CALL(obj, call)
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
#define TEST(test_case_name, test_name)