libcryfs/test/fspp/fuse/statfs/FuseStatfsReturnFilesTest.cpp

24 lines
622 B
C++
Raw Normal View History

2014-11-28 22:11:26 +01:00
#include "testutils/FuseStatfsReturnTest.h"
using ::testing::WithParamInterface;
using ::testing::Values;
2018-09-10 22:11:00 +02:00
class FuseStatfsReturnFilesTest: public FuseStatfsReturnTest<uint64_t>, public WithParamInterface<uint64_t> {
2014-11-28 22:11:26 +01:00
private:
2018-09-10 22:11:00 +02:00
void set(struct ::statvfs *stat, uint64_t value) override {
2014-11-28 22:11:26 +01:00
stat->f_files = value;
}
};
2019-10-13 14:16:06 +02:00
INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnFilesTest, FuseStatfsReturnFilesTest, Values(
2014-11-28 22:11:26 +01:00
0,
10,
256,
1024,
4096
));
TEST_P(FuseStatfsReturnFilesTest, ReturnedFilesIsCorrect) {
struct ::statvfs result = CallStatfsWithValue(GetParam());
EXPECT_EQ(GetParam(), result.f_files);
}