proxygen
TestFile Class Reference

Public Member Functions

 TestFile (bool exists, time_t mTime)
 
void update (bool e, time_t t)
 
FilePoller::FileModificationData toFileModData ()
 

Public Attributes

const std::string name {"fakeFile"}
 

Private Attributes

bool exists_ {false}
 
time_t modTime_ {0}
 
std::mutex m
 

Detailed Description

Definition at line 134 of file FilePollerTest.cpp.

Constructor & Destructor Documentation

TestFile::TestFile ( bool  exists,
time_t  mTime 
)
inline

Definition at line 136 of file FilePollerTest.cpp.

136 : exists_(exists), modTime_(mTime) {}
time_t modTime_

Member Function Documentation

FilePoller::FileModificationData TestFile::toFileModData ( )
inline

Definition at line 144 of file FilePollerTest.cpp.

References m.

144  {
145  std::unique_lock<std::mutex> lk(m);
147  }
std::mutex m
time_t modTime_
void TestFile::update ( bool  e,
time_t  t 
)
inline

Definition at line 138 of file FilePollerTest.cpp.

References m, and folly::pushmi::detail::t.

Referenced by TEST(), and TEST_F().

138  {
139  std::unique_lock<std::mutex> lk(m);
140  exists_ = e;
141  modTime_ = t;
142  }
std::mutex m
time_t modTime_

Member Data Documentation

bool TestFile::exists_ {false}
private

Definition at line 151 of file FilePollerTest.cpp.

std::mutex TestFile::m
private

Definition at line 153 of file FilePollerTest.cpp.

time_t TestFile::modTime_ {0}
private

Definition at line 152 of file FilePollerTest.cpp.

const std::string TestFile::name {"fakeFile"}

Definition at line 149 of file FilePollerTest.cpp.

Referenced by PollerWithState::PollerWithState().


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