proxygen
PollerWithState Struct Reference

Public Member Functions

 PollerWithState (TestFile &testFile)
 
void waitForUpdate (bool expect=true)
 

Public Attributes

std::unique_ptr< FilePollerpoller
 
UpdateSyncState state
 

Detailed Description

Definition at line 173 of file FilePollerTest.cpp.

Constructor & Destructor Documentation

PollerWithState::PollerWithState ( TestFile testFile)
inlineexplicit

Definition at line 174 of file FilePollerTest.cpp.

References TestFile::name.

174  {
175  poller = std::make_unique<NoDiskPoller>(testFile);
176  poller->addFileToTrack(testFile.name, [&] {
177  state.updateTriggered();
178  });
179  }
const std::string name
std::unique_ptr< FilePoller > poller

Member Function Documentation

void PollerWithState::waitForUpdate ( bool  expect = true)
inline

Definition at line 181 of file FilePollerTest.cpp.

References ASSERT_NO_FATAL_FAILURE, and folly::symbolizer::test::expect().

Referenced by TEST(), and TEST_F().

181  {
182  ASSERT_NO_FATAL_FAILURE(state.waitForUpdate(expect));
183  }
void expect(LineReader &lr, const char *expected)
#define ASSERT_NO_FATAL_FAILURE(statement)
Definition: gtest.h:2099
state
Definition: http_parser.c:272

Member Data Documentation

std::unique_ptr<FilePoller> PollerWithState::poller

Definition at line 185 of file FilePollerTest.cpp.

Referenced by TEST_F().

UpdateSyncState PollerWithState::state

Definition at line 186 of file FilePollerTest.cpp.


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