libcryfs/src/test/fspp/fuse/openFile/FuseOpenFlagsTest.cpp

19 lines
524 B
C++
Raw Normal View History

2014-11-20 21:23:35 +01:00
#include "testutils/FuseOpenTest.h"
using ::testing::_;
using ::testing::StrEq;
using ::testing::WithParamInterface;
using ::testing::Values;
class FuseOpenFlagsTest: public FuseOpenTest, public WithParamInterface<int> {
};
INSTANTIATE_TEST_CASE_P(FuseOpenFlagsTest, FuseOpenFlagsTest, Values(O_RDWR, O_RDONLY, O_WRONLY));
TEST_P(FuseOpenFlagsTest, testFlags) {
ReturnIsFileOnLstat(FILENAME);
EXPECT_CALL(fsimpl, openFile(StrEq(FILENAME), OpenFlagsEq(GetParam())))
.Times(1);
OpenFile(FILENAME, GetParam());
}