proxygen
MockTraits Struct Reference

Classes

struct  Forwarder
 

Public Member Functions

 MockTraits ()
 
 ~MockTraits ()
 
 MOCK_METHOD2 (onAllocate, void(std::string *, std::string))
 
 MOCK_METHOD1 (onRecycle, void(std::string *))
 

Static Public Attributes

static MockTraitsinstance
 

Detailed Description

Global Traits mock. It can't be a regular (non-global) mock because we don't have access to the instance.

Definition at line 310 of file IndexedMemPoolTest.cpp.

Constructor & Destructor Documentation

MockTraits::MockTraits ( )
inline

Definition at line 313 of file IndexedMemPoolTest.cpp.

313  {
314  instance = this;
315  }
static MockTraits * instance
MockTraits::~MockTraits ( )
inline

Definition at line 317 of file IndexedMemPoolTest.cpp.

References MOCK_METHOD1, MOCK_METHOD2, and string.

317  {
318  instance = nullptr;
319  }
static MockTraits * instance

Member Function Documentation

MockTraits::MOCK_METHOD1 ( onRecycle  ,
void(std::string *)   
)
MockTraits::MOCK_METHOD2 ( onAllocate  ,
void(std::string *, std::string  
)

Member Data Documentation

MockTraits * MockTraits::instance
static

Definition at line 311 of file IndexedMemPoolTest.cpp.

Referenced by MockTraits::Forwarder::onRecycle().


The documentation for this struct was generated from the following file: