proxygen
EventHandlerTest Class Reference
Inheritance diagram for EventHandlerTest:
testing::Test

Public Member Functions

void SetUp () override
 
void TearDown () override
 
void efd_write (uint64_t val)
 
uint64_t efd_read ()
 
- Public Member Functions inherited from testing::Test
virtual ~Test ()
 
virtual ~Test ()
 
virtual ~Test ()
 

Public Attributes

int efd = 0
 

Additional Inherited Members

- Public Types inherited from testing::Test
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
typedef internal::SetUpTestCaseFunc SetUpTestCaseFunc
 
typedef internal::TearDownTestCaseFunc TearDownTestCaseFunc
 
- Static Public Member Functions inherited from testing::Test
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
static void SetUpTestCase ()
 
static void TearDownTestCase ()
 
static bool HasFatalFailure ()
 
static bool HasNonfatalFailure ()
 
static bool HasFailure ()
 
static void RecordProperty (const std::string &key, const std::string &value)
 
static void RecordProperty (const std::string &key, int value)
 
- Protected Member Functions inherited from testing::Test
 Test ()
 
 Test ()
 
 Test ()
 

Detailed Description

Definition at line 58 of file EventHandlerTest.cpp.

Member Function Documentation

uint64_t EventHandlerTest::efd_read ( )
inline

Definition at line 78 of file EventHandlerTest.cpp.

References fizz::detail::read(), uint64_t, and val.

78  {
79  uint64_t val = 0;
80  read(efd, &val, sizeof(val));
81  return val;
82  }
double val
Definition: String.cpp:273
size_t read(T &out, folly::io::Cursor &cursor)
Definition: Types-inl.h:258
void EventHandlerTest::efd_write ( uint64_t  val)
inline

Definition at line 74 of file EventHandlerTest.cpp.

References fizz::detail::write().

74  {
75  write(efd, &val, sizeof(val));
76  }
void write(const T &in, folly::io::Appender &appender)
Definition: Types-inl.h:112
double val
Definition: String.cpp:273
void EventHandlerTest::SetUp ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 62 of file EventHandlerTest.cpp.

References ASSERT_THAT, EFD_SEMAPHORE, eventfd, and testing::Gt().

62  {
64  ASSERT_THAT(efd, Gt(0));
65  }
internal::GtMatcher< Rhs > Gt(Rhs x)
#define eventfd(initval, flags)
#define ASSERT_THAT(value, matcher)
void EventHandlerTest::TearDown ( )
inlineoverridevirtual

Reimplemented from testing::Test.

Definition at line 67 of file EventHandlerTest.cpp.

References folly::netops::close().

67  {
68  if (efd > 0) {
69  close(efd);
70  }
71  efd = 0;
72  }
int close(NetworkSocket s)
Definition: NetOps.cpp:90

Member Data Documentation

int EventHandlerTest::efd = 0

Definition at line 60 of file EventHandlerTest.cpp.


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