From aafc0f4e55940670ace883fe0029ae93ae8279bb Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Tue, 25 Nov 2014 14:58:00 +0100 Subject: [PATCH] Codestyle --- src/test/fspp/fuse/fstat/FuseFstatErrorTest.cpp | 2 +- src/test/fspp/fuse/fstat/FuseFstatParameterTest.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/test/fspp/fuse/fstat/FuseFstatErrorTest.cpp b/src/test/fspp/fuse/fstat/FuseFstatErrorTest.cpp index cc947f1e..05fdffe4 100644 --- a/src/test/fspp/fuse/fstat/FuseFstatErrorTest.cpp +++ b/src/test/fspp/fuse/fstat/FuseFstatErrorTest.cpp @@ -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)); diff --git a/src/test/fspp/fuse/fstat/FuseFstatParameterTest.cpp b/src/test/fspp/fuse/fstat/FuseFstatParameterTest.cpp index 235452cf..26e4a65b 100644 --- a/src/test/fspp/fuse/fstat/FuseFstatParameterTest.cpp +++ b/src/test/fspp/fuse/fstat/FuseFstatParameterTest.cpp @@ -19,7 +19,10 @@ using namespace fspp; class FuseFstatParameterTest: public FuseFstatTest, public WithParamInterface { 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); }