libcryfs/test/fspp/fuse/access/FuseAccessModeTest.cpp
Sebastian Messmer cc7b38b3c1 - run-clang-tidy.sh also runs on test cases.
- fix clang-tidy warnings in test cases
2017-12-01 15:01:49 +00:00

20 lines
593 B
C++

#include "testutils/FuseAccessTest.h"
using ::testing::StrEq;
using ::testing::Return;
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseAccessModeTest: public FuseAccessTest, public WithParamInterface<int> {
};
INSTANTIATE_TEST_CASE_P(FuseAccessModeTest, FuseAccessModeTest, Values(0, F_OK, R_OK, W_OK, X_OK, R_OK|W_OK, W_OK|X_OK, R_OK|X_OK, R_OK|W_OK|X_OK));
TEST_P(FuseAccessModeTest, AccessFile) {
ReturnIsFileOnLstat(FILENAME);
EXPECT_CALL(fsimpl, access(StrEq(FILENAME), GetParam()))
.Times(1).WillOnce(Return());
AccessFile(FILENAME, GetParam());
}