Codestyle

This commit is contained in:
Sebastian Messmer 2014-11-25 14:58:00 +01:00
parent 6f5c1c17e9
commit aafc0f4e55
2 changed files with 6 additions and 5 deletions

View File

@ -26,7 +26,7 @@ public:
};
INSTANTIATE_TEST_CASE_P(FuseFstatErrorTest, FuseFstatErrorTest, Values(EACCES, EBADF, EFAULT, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EOVERFLOW));
TEST_P(FuseFstatErrorTest, Error) {
TEST_P(FuseFstatErrorTest, ReturnedErrorCodeIsCorrect) {
ReturnDoesntExistOnLstat(FILENAME);
EXPECT_CALL(fsimpl, createAndOpenFile(StrEq(FILENAME), _)).Times(1).WillOnce(Return(0));

View File

@ -19,7 +19,10 @@ using namespace fspp;
class FuseFstatParameterTest: public FuseFstatTest, public WithParamInterface<int> {
public:
void CallFstat(const char *filename) {
auto fs = TestFS();
CreateFile(fs.get(), filename);
}
};
INSTANTIATE_TEST_CASE_P(FuseFstatParameterTest, FuseFstatParameterTest, Values(0,1,10,1000,1024*1024*1024));
@ -27,9 +30,7 @@ INSTANTIATE_TEST_CASE_P(FuseFstatParameterTest, FuseFstatParameterTest, Values(0
TEST_P(FuseFstatParameterTest, FileDescriptorIsCorrect) {
ReturnDoesntExistOnLstat(FILENAME);
EXPECT_CALL(fsimpl, createAndOpenFile(StrEq(FILENAME), _)).Times(1).WillOnce(Return(GetParam()));
EXPECT_CALL(fsimpl, fstat(Eq(GetParam()), _)).Times(1).WillOnce(ReturnIsFileFstat);
auto fs = TestFS();
CreateFile(fs.get(), FILENAME);
CallFstat(FILENAME);
}