37 #include "gmock/gmock.h" 45 virtual ~FooInterface() {}
46 virtual void DoThis() = 0;
49 class MockFoo :
public FooInterface {
59 TEST(LeakTest, LeakedMockWithExpectCallCausesFailureWhenLeakCheckingIsEnabled) {
60 MockFoo*
foo =
new MockFoo;
72 TEST(LeakTest, LeakedMockWithOnCallCausesFailureWhenLeakCheckingIsEnabled) {
73 MockFoo* foo =
new MockFoo;
84 TEST(LeakTest, CatchesMultipleLeakedMockObjects) {
85 MockFoo* foo1 =
new MockFoo;
86 MockFoo* foo2 =
new MockFoo;
#define MOCK_METHOD0(m,...)
#define GTEST_DISALLOW_COPY_AND_ASSIGN_(type)
#define ON_CALL(obj, call)
#define TEST(test_case_name, test_name)
#define EXPECT_CALL(obj, call)
internal::ReturnAction< R > Return(R value)