libcryfs/test/fspp/fuse/utimens/testutils/FuseUtimensTest.h
2016-02-11 12:53:42 +01:00

23 lines
714 B
C++

#pragma once
#ifndef MESSMER_FSPP_TEST_FUSE_UTIMENS_TESTUTILS_FUSEUTIMENSTEST_H_
#define MESSMER_FSPP_TEST_FUSE_UTIMENS_TESTUTILS_FUSEUTIMENSTEST_H_
#include "../../../testutils/FuseTest.h"
class FuseUtimensTest: public FuseTest {
public:
const char *FILENAME = "/myfile";
timespec TIMEVALUE = makeTimespec(0,0);
void Utimens(const char *filename, timespec lastAccessTime, timespec lastModificationTime);
int UtimensReturnError(const char *filename, timespec lastAccessTime, timespec lastModificationTime);
static struct timespec makeTimespec(time_t tv_sec, long tv_nsec);
};
MATCHER_P(TimeSpecEq, expected, "") {
return expected.tv_sec == arg.tv_sec && expected.tv_nsec == arg.tv_nsec;
}
#endif