Fix googletest deprecations
This commit is contained in:
parent
7d8cdbba40
commit
bb4c10770a
@ -1 +1 @@
|
||||
#include "ClientIdAndBlockId.h"
|
||||
#include "ClientIdAndBlockId.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "MockBlockStore.h"
|
||||
#include "MockBlockStore.h"
|
||||
|
@ -9,4 +9,4 @@ namespace cpputils {
|
||||
return newData;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ namespace cpputils {
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -3,4 +3,4 @@
|
||||
namespace cpputils {
|
||||
constexpr size_t PseudoRandomPool::MIN_BUFFER_SIZE;
|
||||
constexpr size_t PseudoRandomPool::MAX_BUFFER_SIZE;
|
||||
}
|
||||
}
|
||||
|
@ -2,4 +2,4 @@
|
||||
|
||||
namespace cpputils {
|
||||
std::mutex Random::_mutex;
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#include "RandomGenerator.h"
|
||||
#include "RandomGenerator.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "FuseErrnoException.h"
|
||||
#include "FuseErrnoException.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "Node.h"
|
||||
#include "Node.h"
|
||||
|
@ -18,24 +18,24 @@
|
||||
#include "FsppOpenFileTest_Timestamps.h"
|
||||
|
||||
#define FSPP_ADD_FILESYTEM_TESTS(FS_NAME, FIXTURE) \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDeviceTest_One, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDeviceTest_Two, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppDeviceTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDirTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDirTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppDirTest_Timestamps_Entries, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppFileTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppFileTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppSymlinkTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppSymlinkTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppNodeTest_Rename, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppNodeTest_Stat, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppNodeTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppNodeTest_Stat_FileOnly, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppNodeTest_Stat_DirOnly, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppNodeTest_Stat_SymlinkOnly, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppOpenFileTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppOpenFileTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDeviceTest_One, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDeviceTest_Two, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppDeviceTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDirTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDirTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppDirTest_Timestamps_Entries, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppFileTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppFileTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppSymlinkTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppSymlinkTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppNodeTest_Rename, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppNodeTest_Stat, FIXTURE); \
|
||||
INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppNodeTest_Timestamps, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppNodeTest_Stat_FileOnly, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppNodeTest_Stat_DirOnly, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppNodeTest_Stat_SymlinkOnly, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppOpenFileTest, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppOpenFileTest_Timestamps, FIXTURE); \
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -22,12 +22,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
//Unfortunately, googletest only allows 50 test cases per REGISTER_TYPED_TEST_CASE_P, so we have to split it.
|
||||
//Unfortunately, googletest only allows 50 test cases per REGISTER_TYPED_TEST_SUITE_P, so we have to split it.
|
||||
template<class ConcreteFileSystemTestFixture> class FsppDeviceTest_One: public FsppDeviceTest<ConcreteFileSystemTestFixture> {};
|
||||
template<class ConcreteFileSystemTestFixture> class FsppDeviceTest_Two: public FsppDeviceTest<ConcreteFileSystemTestFixture> {};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppDeviceTest_One);
|
||||
TYPED_TEST_CASE_P(FsppDeviceTest_Two);
|
||||
TYPED_TEST_SUITE_P(FsppDeviceTest_One);
|
||||
TYPED_TEST_SUITE_P(FsppDeviceTest_Two);
|
||||
|
||||
TYPED_TEST_P(FsppDeviceTest_One, InitFilesystem) {
|
||||
//fixture->createDevice() is called in the FileSystemTest constructor
|
||||
@ -410,7 +410,7 @@ TYPED_TEST_P(FsppDeviceTest_Two, LoadSymlinkFromDir_Nesting2_LoadDir) {
|
||||
|
||||
//TODO Test statfs
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest_One,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppDeviceTest_One,
|
||||
InitFilesystem,
|
||||
LoadRootDir_Load,
|
||||
LoadRootDir_LoadDir,
|
||||
@ -462,7 +462,7 @@ REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest_One,
|
||||
LoadSymlinkFromDir_Nesting1_LoadDir
|
||||
);
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest_Two,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppDeviceTest_Two,
|
||||
LoadFileFromDir_Nesting2_Load,
|
||||
LoadFileFromDir_Nesting2_LoadFile,
|
||||
LoadFileFromDir_Nesting2_LoadDir,
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_NODE_TEST_CASE(FsppDeviceTest_Timestamps,
|
||||
REGISTER_NODE_TEST_SUITE(FsppDeviceTest_Timestamps,
|
||||
Load_While_Loaded,
|
||||
Load_While_Not_Loaded
|
||||
);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
EXPECT_TRUE(false);
|
||||
}
|
||||
};
|
||||
TYPED_TEST_CASE_P(FsppDirTest);
|
||||
TYPED_TEST_SUITE_P(FsppDirTest);
|
||||
|
||||
inline fspp::Dir::Entry DirEntry(const std::string &name) {
|
||||
return fspp::Dir::Entry(fspp::Dir::EntryType::DIR, name);
|
||||
@ -267,7 +267,7 @@ TYPED_TEST_P(FsppDirTest, Remove_Nested) {
|
||||
EXPECT_EQ(boost::none, this->device->LoadDir("/mytestdir/mydir"));
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppDirTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppDirTest,
|
||||
Children_RootDir_Empty,
|
||||
Children_RootDir_OneFile_Directly,
|
||||
Children_RootDir_OneFile_AfterReloadingDir,
|
||||
|
@ -8,7 +8,7 @@ template<class ConcreteFileSystemTestFixture>
|
||||
class FsppDirTest_Timestamps: public TimestampTestUtils<ConcreteFileSystemTestFixture> {
|
||||
public:
|
||||
};
|
||||
TYPED_TEST_CASE_P(FsppDirTest_Timestamps);
|
||||
TYPED_TEST_SUITE_P(FsppDirTest_Timestamps);
|
||||
|
||||
TYPED_TEST_P(FsppDirTest_Timestamps, createAndOpenFile) {
|
||||
auto dir = this->CreateDir("/mydir");
|
||||
@ -232,7 +232,7 @@ public:
|
||||
}*/
|
||||
};
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppDirTest_Timestamps,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppDirTest_Timestamps,
|
||||
createAndOpenFile,
|
||||
createAndOpenFile_TimestampsOfCreatedFile,
|
||||
createDir,
|
||||
@ -243,7 +243,7 @@ REGISTER_TYPED_TEST_CASE_P(FsppDirTest_Timestamps,
|
||||
children_nonempty
|
||||
);
|
||||
|
||||
REGISTER_NODE_TEST_CASE(FsppDirTest_Timestamps_Entries,
|
||||
REGISTER_NODE_TEST_SUITE(FsppDirTest_Timestamps_Entries,
|
||||
deleteChild,
|
||||
renameChild,
|
||||
moveChildIn,
|
||||
|
@ -89,7 +89,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppFileTest);
|
||||
TYPED_TEST_SUITE_P(FsppFileTest);
|
||||
|
||||
TYPED_TEST_P(FsppFileTest, Open_RDONLY) {
|
||||
this->Test_Open_RDONLY(this->file_root.get());
|
||||
@ -214,7 +214,7 @@ TYPED_TEST_P(FsppFileTest, Remove_Nested) {
|
||||
EXPECT_EQ(boost::none, this->device->LoadFile("/mytestdir/myfile"));
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppFileTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppFileTest,
|
||||
Open_RDONLY,
|
||||
Open_RDONLY_Nested,
|
||||
Open_WRONLY,
|
||||
|
@ -14,7 +14,7 @@ public:
|
||||
return file;
|
||||
}
|
||||
};
|
||||
TYPED_TEST_CASE_P(FsppFileTest_Timestamps);
|
||||
TYPED_TEST_SUITE_P(FsppFileTest_Timestamps);
|
||||
|
||||
TYPED_TEST_P(FsppFileTest_Timestamps, open_nomode) {
|
||||
auto file = this->CreateFile("/myfile");
|
||||
@ -88,7 +88,7 @@ TYPED_TEST_P(FsppFileTest_Timestamps, truncate_nonempty_to_nonempty_grow) {
|
||||
this->EXPECT_OPERATION_UPDATES_TIMESTAMPS_AS("/myfile", operation, {this->ExpectDoesntUpdateAccessTimestamp, this->ExpectUpdatesModificationTimestamp, this->ExpectUpdatesMetadataTimestamp});
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppFileTest_Timestamps,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppFileTest_Timestamps,
|
||||
open_nomode,
|
||||
open_rdonly,
|
||||
open_wronly,
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_NODE_TEST_CASE(FsppNodeTest_Rename,
|
||||
REGISTER_NODE_TEST_SUITE(FsppNodeTest_Rename,
|
||||
Error_TargetParentDirDoesntExist,
|
||||
Error_TargetParentDirIsFile,
|
||||
Error_RootDir,
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
template<class ConcreteFileSystemTestFixture>
|
||||
class FsppNodeTest_Stat_FileOnly: public FileSystemTest<ConcreteFileSystemTestFixture>, public FsppNodeTestHelper {};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppNodeTest_Stat_FileOnly);
|
||||
TYPED_TEST_SUITE_P(FsppNodeTest_Stat_FileOnly);
|
||||
|
||||
TYPED_TEST_P(FsppNodeTest_Stat_FileOnly, CreatedFileIsEmpty) {
|
||||
this->CreateFile("/myfile");
|
||||
@ -41,7 +41,7 @@ TYPED_TEST_P(FsppNodeTest_Stat_FileOnly, FileIsFile) {
|
||||
template<class ConcreteFileSystemTestFixture>
|
||||
class FsppNodeTest_Stat_DirOnly: public FileSystemTest<ConcreteFileSystemTestFixture>, public FsppNodeTestHelper {};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppNodeTest_Stat_DirOnly);
|
||||
TYPED_TEST_SUITE_P(FsppNodeTest_Stat_DirOnly);
|
||||
|
||||
TYPED_TEST_P(FsppNodeTest_Stat_DirOnly, DirIsDir) {
|
||||
this->CreateDir("/mydir");
|
||||
@ -55,7 +55,7 @@ TYPED_TEST_P(FsppNodeTest_Stat_DirOnly, DirIsDir) {
|
||||
template<class ConcreteFileSystemTestFixture>
|
||||
class FsppNodeTest_Stat_SymlinkOnly: public FileSystemTest<ConcreteFileSystemTestFixture>, public FsppNodeTestHelper {};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppNodeTest_Stat_SymlinkOnly);
|
||||
TYPED_TEST_SUITE_P(FsppNodeTest_Stat_SymlinkOnly);
|
||||
|
||||
TYPED_TEST_P(FsppNodeTest_Stat_SymlinkOnly, SymlinkIsSymlink) {
|
||||
this->CreateSymlink("/mysymlink");
|
||||
@ -65,20 +65,20 @@ TYPED_TEST_P(FsppNodeTest_Stat_SymlinkOnly, SymlinkIsSymlink) {
|
||||
});
|
||||
}
|
||||
|
||||
REGISTER_NODE_TEST_CASE(FsppNodeTest_Stat,
|
||||
REGISTER_NODE_TEST_SUITE(FsppNodeTest_Stat,
|
||||
Nlink
|
||||
);
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppNodeTest_Stat_FileOnly,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppNodeTest_Stat_FileOnly,
|
||||
CreatedFileIsEmpty,
|
||||
FileIsFile
|
||||
);
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppNodeTest_Stat_DirOnly,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppNodeTest_Stat_DirOnly,
|
||||
DirIsDir
|
||||
);
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppNodeTest_Stat_SymlinkOnly,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppNodeTest_Stat_SymlinkOnly,
|
||||
SymlinkIsSymlink
|
||||
);
|
||||
|
||||
|
@ -349,7 +349,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
REGISTER_NODE_TEST_CASE(FsppNodeTest_Timestamps,
|
||||
REGISTER_NODE_TEST_SUITE(FsppNodeTest_Timestamps,
|
||||
Create,
|
||||
Stat,
|
||||
Chmod,
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppOpenFileTest);
|
||||
TYPED_TEST_SUITE_P(FsppOpenFileTest);
|
||||
|
||||
TYPED_TEST_P(FsppOpenFileTest, CreatedFileIsEmpty) {
|
||||
auto file = this->CreateFile("/myfile");
|
||||
@ -45,7 +45,7 @@ TYPED_TEST_P(FsppOpenFileTest, FileIsFile) {
|
||||
});
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppOpenFileTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppOpenFileTest,
|
||||
CreatedFileIsEmpty,
|
||||
FileIsFile
|
||||
);
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
return openFile;
|
||||
}
|
||||
};
|
||||
TYPED_TEST_CASE_P(FsppOpenFileTest_Timestamps);
|
||||
TYPED_TEST_SUITE_P(FsppOpenFileTest_Timestamps);
|
||||
|
||||
TYPED_TEST_P(FsppOpenFileTest_Timestamps, stat) {
|
||||
auto openFile = this->CreateAndOpenFile("/mynode");
|
||||
@ -130,7 +130,7 @@ TYPED_TEST_P(FsppOpenFileTest_Timestamps, fdatasync) {
|
||||
this->EXPECT_OPERATION_UPDATES_TIMESTAMPS_AS(*openFile, operation, {this->ExpectDoesntUpdateAnyTimestamps});
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppOpenFileTest_Timestamps,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppOpenFileTest_Timestamps,
|
||||
stat,
|
||||
truncate_empty_to_empty,
|
||||
truncate_empty_to_nonempty,
|
||||
|
@ -11,7 +11,7 @@ class FsppSymlinkTest: public FileSystemTest<ConcreteFileSystemTestFixture> {
|
||||
public:
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(FsppSymlinkTest);
|
||||
TYPED_TEST_SUITE_P(FsppSymlinkTest);
|
||||
|
||||
TYPED_TEST_P(FsppSymlinkTest, Create_AbsolutePath) {
|
||||
this->CreateSymlink("/mysymlink", "/my/symlink/target");
|
||||
@ -50,7 +50,7 @@ TYPED_TEST_P(FsppSymlinkTest, Remove_Nested) {
|
||||
EXPECT_EQ(boost::none, this->device->LoadSymlink("/mytestdir/mysymlink"));
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppSymlinkTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppSymlinkTest,
|
||||
Create_AbsolutePath,
|
||||
Create_RelativePath,
|
||||
Read_AbsolutePath,
|
||||
|
@ -8,7 +8,7 @@ template<class ConcreteFileSystemTestFixture>
|
||||
class FsppSymlinkTest_Timestamps: public TimestampTestUtils<ConcreteFileSystemTestFixture> {
|
||||
public:
|
||||
};
|
||||
TYPED_TEST_CASE_P(FsppSymlinkTest_Timestamps);
|
||||
TYPED_TEST_SUITE_P(FsppSymlinkTest_Timestamps);
|
||||
|
||||
TYPED_TEST_P(FsppSymlinkTest_Timestamps, target) {
|
||||
auto symlink = this->CreateSymlink("/mysymlink");
|
||||
@ -19,7 +19,7 @@ TYPED_TEST_P(FsppSymlinkTest_Timestamps, target) {
|
||||
this->EXPECT_OPERATION_UPDATES_TIMESTAMPS_AS("/mysymlink", operation, {this->ExpectUpdatesAccessTimestamp, this->ExpectDoesntUpdateModificationTimestamp, this->ExpectDoesntUpdateMetadataTimestamp});
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(FsppSymlinkTest_Timestamps,
|
||||
REGISTER_TYPED_TEST_SUITE_P(FsppSymlinkTest_Timestamps,
|
||||
target
|
||||
);
|
||||
|
||||
|
@ -25,7 +25,7 @@ public:
|
||||
* Inherit your fixture from this class to write a test case that is run on nodes, i.e. files, directories and symlinks.
|
||||
* You can use this->CreateNode() to create a node and then call fspp::Node functions on it.
|
||||
* Add your test cases as void Test_xxx() functions to your fixture and register/instantiate them using
|
||||
* REGISTER_NODE_TEST_CASE and INSTANTIATE_NODE_TEST_CASE.
|
||||
* REGISTER_NODE_TEST_SUITE and INSTANTIATE_NODE_TEST_SUITE.
|
||||
* It will then automatically create a test case for each node type (file, directory, symlink).
|
||||
* See FsppNodeTest_Rename for an example.
|
||||
*/
|
||||
@ -35,16 +35,16 @@ public:
|
||||
virtual cpputils::unique_ref<fspp::Node> CreateNode(const boost::filesystem::path &path) = 0;
|
||||
};
|
||||
|
||||
#define _REGISTER_SINGLE_NODE_TEST_CASE(r, Class, Name) \
|
||||
#define _REGISTER_SINGLE_NODE_TEST_SUITE(r, Class, Name) \
|
||||
TYPED_TEST_P(Class, Name) { \
|
||||
this->BOOST_PP_CAT(Test_,Name)(); \
|
||||
} \
|
||||
|
||||
#define _REGISTER_NODE_TEST_CASES_FOR_CLASS(Class, ...) \
|
||||
BOOST_PP_SEQ_FOR_EACH(_REGISTER_SINGLE_NODE_TEST_CASE, Class, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)); \
|
||||
REGISTER_TYPED_TEST_CASE_P(Class, __VA_ARGS__); \
|
||||
#define _REGISTER_NODE_TEST_SUITES_FOR_CLASS(Class, ...) \
|
||||
BOOST_PP_SEQ_FOR_EACH(_REGISTER_SINGLE_NODE_TEST_SUITE, Class, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)); \
|
||||
REGISTER_TYPED_TEST_SUITE_P(Class, __VA_ARGS__); \
|
||||
|
||||
#define _REGISTER_FILE_TEST_CASE(Class, ...) \
|
||||
#define _REGISTER_FILE_TEST_SUITE(Class, ...) \
|
||||
template<class ConcreteFileSystemTestFixture> \
|
||||
class Class##_FileNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \
|
||||
public: \
|
||||
@ -53,10 +53,10 @@ public:
|
||||
return this->Load(path); \
|
||||
} \
|
||||
}; \
|
||||
TYPED_TEST_CASE_P(Class##_FileNode); \
|
||||
_REGISTER_NODE_TEST_CASES_FOR_CLASS(Class##_FileNode, __VA_ARGS__); \
|
||||
TYPED_TEST_SUITE_P(Class##_FileNode); \
|
||||
_REGISTER_NODE_TEST_SUITES_FOR_CLASS(Class##_FileNode, __VA_ARGS__); \
|
||||
|
||||
#define _REGISTER_DIR_TEST_CASE(Class, ...) \
|
||||
#define _REGISTER_DIR_TEST_SUITE(Class, ...) \
|
||||
template<class ConcreteFileSystemTestFixture> \
|
||||
class Class##_DirNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \
|
||||
public: \
|
||||
@ -65,10 +65,10 @@ public:
|
||||
return this->Load(path); \
|
||||
} \
|
||||
}; \
|
||||
TYPED_TEST_CASE_P(Class##_DirNode); \
|
||||
_REGISTER_NODE_TEST_CASES_FOR_CLASS(Class##_DirNode, __VA_ARGS__); \
|
||||
TYPED_TEST_SUITE_P(Class##_DirNode); \
|
||||
_REGISTER_NODE_TEST_SUITES_FOR_CLASS(Class##_DirNode, __VA_ARGS__); \
|
||||
|
||||
#define _REGISTER_SYMLINK_TEST_CASE(Class, ...) \
|
||||
#define _REGISTER_SYMLINK_TEST_SUITE(Class, ...) \
|
||||
template<class ConcreteFileSystemTestFixture> \
|
||||
class Class##_SymlinkNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \
|
||||
public: \
|
||||
@ -77,17 +77,17 @@ public:
|
||||
return this->Load(path); \
|
||||
} \
|
||||
}; \
|
||||
TYPED_TEST_CASE_P(Class##_SymlinkNode); \
|
||||
_REGISTER_NODE_TEST_CASES_FOR_CLASS(Class##_SymlinkNode, __VA_ARGS__); \
|
||||
TYPED_TEST_SUITE_P(Class##_SymlinkNode); \
|
||||
_REGISTER_NODE_TEST_SUITES_FOR_CLASS(Class##_SymlinkNode, __VA_ARGS__); \
|
||||
|
||||
#define REGISTER_NODE_TEST_CASE(Class, ...) \
|
||||
_REGISTER_FILE_TEST_CASE(Class, __VA_ARGS__); \
|
||||
_REGISTER_DIR_TEST_CASE(Class, __VA_ARGS__); \
|
||||
_REGISTER_SYMLINK_TEST_CASE(Class, __VA_ARGS__); \
|
||||
#define REGISTER_NODE_TEST_SUITE(Class, ...) \
|
||||
_REGISTER_FILE_TEST_SUITE(Class, __VA_ARGS__); \
|
||||
_REGISTER_DIR_TEST_SUITE(Class, __VA_ARGS__); \
|
||||
_REGISTER_SYMLINK_TEST_SUITE(Class, __VA_ARGS__); \
|
||||
|
||||
#define INSTANTIATE_NODE_TEST_CASE(FS_NAME, Class, FIXTURE) \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, Class##_FileNode, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, Class##_DirNode, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, Class##_SymlinkNode, FIXTURE); \
|
||||
#define INSTANTIATE_NODE_TEST_SUITE(FS_NAME, Class, FIXTURE) \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, Class##_FileNode, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, Class##_DirNode, FIXTURE); \
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, Class##_SymlinkNode, FIXTURE); \
|
||||
|
||||
#endif
|
||||
|
@ -86,4 +86,4 @@ namespace gitversion {
|
||||
return std::make_tuple(gitCommitId.substr(1), std::stoul(commitsSinceTag));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
#include "ParallelAccessBaseStore.h"
|
||||
#include "ParallelAccessBaseStore.h"
|
||||
|
@ -1 +1 @@
|
||||
#include "ParallelAccessStore.h"
|
||||
#include "ParallelAccessStore.h"
|
||||
|
@ -182,7 +182,7 @@ public:
|
||||
EXPECT_DATA_READS_AS_OUTSIDE_OF(ZEROES, blob, start, count);
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(BlobReadWriteDataTest, BlobReadWriteDataTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(BlobReadWriteDataTest, BlobReadWriteDataTest, Values(
|
||||
//Blob with only one leaf
|
||||
DataRange{BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf(), 0, BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf()}, // full size leaf, access beginning to end
|
||||
DataRange{BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf(), 100, BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf()-200}, // full size leaf, access middle to middle
|
||||
|
@ -160,7 +160,7 @@ public:
|
||||
return leaf->blockId();
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(DataLeafNodeSizeTest, DataLeafNodeSizeTest, Values(0, 1, 5, 16, 32, 512, DataNodeLayout(DataLeafNodeTest::BLOCKSIZE_BYTES).maxBytesPerLeaf()));
|
||||
INSTANTIATE_TEST_SUITE_P(DataLeafNodeSizeTest, DataLeafNodeSizeTest, Values(0, 1, 5, 16, 32, 512, DataNodeLayout(DataLeafNodeTest::BLOCKSIZE_BYTES).maxBytesPerLeaf()));
|
||||
|
||||
TEST_P(DataLeafNodeSizeTest, ResizeNode_ReadSizeImmediately) {
|
||||
leaf->resize(GetParam());
|
||||
@ -305,7 +305,7 @@ public:
|
||||
EXPECT_DATA_READS_AS_OUTSIDE_OF(ZEROES, leaf, start, count);
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(DataLeafNodeDataTest, DataLeafNodeDataTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(DataLeafNodeDataTest, DataLeafNodeDataTest, Values(
|
||||
DataRange{DataLeafNodeTest::LAYOUT.maxBytesPerLeaf(), 0, DataLeafNodeTest::LAYOUT.maxBytesPerLeaf()}, // full size leaf, access beginning to end
|
||||
DataRange{DataLeafNodeTest::LAYOUT.maxBytesPerLeaf(), 100, DataLeafNodeTest::LAYOUT.maxBytesPerLeaf()-200}, // full size leaf, access middle to middle
|
||||
DataRange{DataLeafNodeTest::LAYOUT.maxBytesPerLeaf(), 0, DataLeafNodeTest::LAYOUT.maxBytesPerLeaf()-100}, // full size leaf, access beginning to middle
|
||||
|
@ -31,7 +31,7 @@ public:
|
||||
|
||||
class DataNodeViewDepthTest: public DataNodeViewTest, public WithParamInterface<uint8_t> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(DataNodeViewDepthTest, DataNodeViewDepthTest, Values(0, 1, 3, 10, 100));
|
||||
INSTANTIATE_TEST_SUITE_P(DataNodeViewDepthTest, DataNodeViewDepthTest, Values(0, 1, 3, 10, 100));
|
||||
|
||||
TEST_P(DataNodeViewDepthTest, DepthIsStored) {
|
||||
auto block = blockStore->create(Data(BLOCKSIZE_BYTES));
|
||||
@ -46,7 +46,7 @@ TEST_P(DataNodeViewDepthTest, DepthIsStored) {
|
||||
|
||||
class DataNodeViewSizeTest: public DataNodeViewTest, public WithParamInterface<uint32_t> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(DataNodeViewSizeTest, DataNodeViewSizeTest, Values(0, 50, 64, 1024, 1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(DataNodeViewSizeTest, DataNodeViewSizeTest, Values(0, 50, 64, 1024, 1024*1024*1024));
|
||||
|
||||
TEST_P(DataNodeViewSizeTest, SizeIsStored) {
|
||||
auto block = blockStore->create(Data(BLOCKSIZE_BYTES));
|
||||
|
@ -17,9 +17,9 @@ TEST_F(DataTreeTest_NumStoredBytes, CreatedTreeIsEmpty) {
|
||||
}
|
||||
|
||||
class DataTreeTest_NumStoredBytes_P: public DataTreeTest_NumStoredBytes, public WithParamInterface<uint32_t> {};
|
||||
INSTANTIATE_TEST_CASE_P(EmptyLastLeaf, DataTreeTest_NumStoredBytes_P, Values(0u));
|
||||
INSTANTIATE_TEST_CASE_P(HalfFullLastLeaf, DataTreeTest_NumStoredBytes_P, Values(5u, 10u));
|
||||
INSTANTIATE_TEST_CASE_P(FullLastLeaf, DataTreeTest_NumStoredBytes_P, Values(static_cast<uint32_t>(DataNodeLayout(DataTreeTest_NumStoredBytes::BLOCKSIZE_BYTES).maxBytesPerLeaf())));
|
||||
INSTANTIATE_TEST_SUITE_P(EmptyLastLeaf, DataTreeTest_NumStoredBytes_P, Values(0u));
|
||||
INSTANTIATE_TEST_SUITE_P(HalfFullLastLeaf, DataTreeTest_NumStoredBytes_P, Values(5u, 10u));
|
||||
INSTANTIATE_TEST_SUITE_P(FullLastLeaf, DataTreeTest_NumStoredBytes_P, Values(static_cast<uint32_t>(DataNodeLayout(DataTreeTest_NumStoredBytes::BLOCKSIZE_BYTES).maxBytesPerLeaf())));
|
||||
|
||||
//TODO Test numLeaves() and numNodes() also two configurations with same number of bytes but different number of leaves (last leaf has 0 bytes)
|
||||
|
||||
|
@ -135,7 +135,7 @@ public:
|
||||
uint32_t traversalBeginIndex;
|
||||
Data ZEROES;
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(DataTreeTest_ResizeByTraversing_P, DataTreeTest_ResizeByTraversing_P,
|
||||
INSTANTIATE_TEST_SUITE_P(DataTreeTest_ResizeByTraversing_P, DataTreeTest_ResizeByTraversing_P,
|
||||
Combine(
|
||||
//Tree we're starting with
|
||||
Values<function<unique_ref<DataTree>(DataTreeTest_ResizeByTraversing*, uint32_t)>>(
|
||||
|
@ -124,7 +124,7 @@ public:
|
||||
uint64_t newSize;
|
||||
Data ZEROES;
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(DataTreeTest_ResizeNumBytes_P, DataTreeTest_ResizeNumBytes_P,
|
||||
INSTANTIATE_TEST_SUITE_P(DataTreeTest_ResizeNumBytes_P, DataTreeTest_ResizeNumBytes_P,
|
||||
Combine(
|
||||
//Tree we're starting with
|
||||
Values<function<unique_ref<DataTree>(DataTreeTest_ResizeNumBytes*, uint32_t)>>(
|
||||
|
@ -74,4 +74,4 @@ TEST_F(IntPowTest, 64bit) {
|
||||
uint64_t value = UINT64_C(1024)*1024*1024*1024;
|
||||
EXPECT_GT(value, std::numeric_limits<uint32_t>::max());
|
||||
EXPECT_EQ(value*value*value, intPow(value, UINT64_C(3)));
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Caching2, BlockStoreTest, CachingBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Caching2, BlockStoreTest, CachingBlockStoreTestFixture);
|
||||
|
||||
|
||||
class CachingBlockStore2TestFixture: public BlockStore2TestFixture {
|
||||
@ -34,4 +34,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Caching, BlockStore2Test, CachingBlockStore2TestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Caching, BlockStore2Test, CachingBlockStore2TestFixture);
|
||||
|
@ -23,5 +23,5 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Compressing_Gzip, BlockStoreTest, CompressingBlockStoreTestFixture<Gzip>);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Compressing_RunLengthEncoding, BlockStoreTest, CompressingBlockStoreTestFixture<RunLengthEncoding>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Compressing_Gzip, BlockStoreTest, CompressingBlockStoreTestFixture<Gzip>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Compressing_RunLengthEncoding, BlockStoreTest, CompressingBlockStoreTestFixture<RunLengthEncoding>);
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(CompressorTest);
|
||||
TYPED_TEST_SUITE_P(CompressorTest);
|
||||
|
||||
TYPED_TEST_P(CompressorTest, Empty) {
|
||||
Data empty(0);
|
||||
@ -77,7 +77,7 @@ TYPED_TEST_P(CompressorTest, LargeRunsAndArbitrary) {
|
||||
this->EXPECT_COMPRESS_AND_DECOMPRESS_IS_IDENTITY(data);
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(CompressorTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(CompressorTest,
|
||||
Empty,
|
||||
ArbitraryData,
|
||||
Zeroes,
|
||||
@ -88,5 +88,5 @@ REGISTER_TYPED_TEST_CASE_P(CompressorTest,
|
||||
LargeRunsAndArbitrary
|
||||
);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Gzip, CompressorTest, Gzip);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(RunLengthEncoding, CompressorTest, RunLengthEncoding);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Gzip, CompressorTest, Gzip);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(RunLengthEncoding, CompressorTest, RunLengthEncoding);
|
||||
|
@ -41,9 +41,9 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_FakeCipher, BlockStoreTest, EncryptedBlockStoreTestFixture<FakeAuthenticatedCipher>);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_AES256_GCM, BlockStoreTest, EncryptedBlockStoreTestFixture<AES256_GCM>);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_AES256_CFB, BlockStoreTest, EncryptedBlockStoreTestFixture<AES256_CFB>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_FakeCipher, BlockStoreTest, EncryptedBlockStoreTestFixture<FakeAuthenticatedCipher>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_AES256_GCM, BlockStoreTest, EncryptedBlockStoreTestFixture<AES256_GCM>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_AES256_CFB, BlockStoreTest, EncryptedBlockStoreTestFixture<AES256_CFB>);
|
||||
|
||||
template<class Cipher>
|
||||
class EncryptedBlockStore2TestFixture: public BlockStore2TestFixture {
|
||||
@ -60,6 +60,6 @@ private:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_FakeCipher, BlockStore2Test, EncryptedBlockStore2TestFixture<FakeAuthenticatedCipher>);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_AES256_GCM, BlockStore2Test, EncryptedBlockStore2TestFixture<AES256_GCM>);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_AES256_CFB, BlockStore2Test, EncryptedBlockStore2TestFixture<AES256_CFB>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_FakeCipher, BlockStore2Test, EncryptedBlockStore2TestFixture<FakeAuthenticatedCipher>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_AES256_GCM, BlockStore2Test, EncryptedBlockStore2TestFixture<AES256_GCM>);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_AES256_CFB, BlockStore2Test, EncryptedBlockStore2TestFixture<AES256_CFB>);
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(InMemory, BlockStoreTest, InMemoryBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(InMemory, BlockStoreTest, InMemoryBlockStoreTestFixture);
|
||||
|
||||
class InMemoryBlockStore2TestFixture: public BlockStore2TestFixture {
|
||||
public:
|
||||
@ -32,4 +32,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(InMemory, BlockStore2Test, InMemoryBlockStore2TestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(InMemory, BlockStore2Test, InMemoryBlockStore2TestFixture);
|
||||
|
@ -35,10 +35,10 @@ using IntegrityBlockStoreTestFixture_singleclient = IntegrityBlockStoreTestFixtu
|
||||
using IntegrityBlockStoreTestFixture_multiclient_allowIntegrityViolations = IntegrityBlockStoreTestFixture<true, false>;
|
||||
using IntegrityBlockStoreTestFixture_singleclient_allowIntegrityViolations = IntegrityBlockStoreTestFixture<true, true>;
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_singleclient, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient_allowIntegrityViolations, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient_allowIntegrityViolations);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_singleclient_allowIntegrityViolations, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient_allowIntegrityViolations);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_multiclient, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_singleclient, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_multiclient_allowIntegrityViolations, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient_allowIntegrityViolations);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_singleclient_allowIntegrityViolations, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient_allowIntegrityViolations);
|
||||
|
||||
template<bool AllowIntegrityViolations, bool MissingBlockIsIntegrityViolation>
|
||||
class IntegrityBlockStore2TestFixture: public BlockStore2TestFixture {
|
||||
@ -56,7 +56,7 @@ using IntegrityBlockStore2TestFixture_singleclient = IntegrityBlockStore2TestFix
|
||||
using IntegrityBlockStore2TestFixture_multiclient_allowIntegrityViolations = IntegrityBlockStore2TestFixture<true, false>;
|
||||
using IntegrityBlockStore2TestFixture_singleclient_allowIntegrityViolations = IntegrityBlockStore2TestFixture<true, true>;
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_singleclient, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient_allowIntegrityViolations, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient_allowIntegrityViolations);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_singleclient_allowIntegrityViolations, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient_allowIntegrityViolations);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_multiclient, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_singleclient, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_multiclient_allowIntegrityViolations, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient_allowIntegrityViolations);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_singleclient_allowIntegrityViolations, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient_allowIntegrityViolations);
|
||||
|
@ -22,4 +22,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(LowToHighLevel, BlockStoreTest, LowToHighLevelBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(LowToHighLevel, BlockStoreTest, LowToHighLevelBlockStoreTestFixture);
|
||||
|
@ -17,4 +17,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mock, BlockStoreTest, MockBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mock, BlockStoreTest, MockBlockStoreTestFixture);
|
||||
|
@ -29,7 +29,7 @@ private:
|
||||
TempDir tempdir;
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(OnDisk, BlockStoreTest, OnDiskBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(OnDisk, BlockStoreTest, OnDiskBlockStoreTestFixture);
|
||||
|
||||
class OnDiskBlockStore2TestFixture: public BlockStore2TestFixture {
|
||||
public:
|
||||
@ -42,4 +42,4 @@ private:
|
||||
TempDir tempdir;
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(OnDisk, BlockStore2Test, OnDiskBlockStore2TestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(OnDisk, BlockStore2Test, OnDiskBlockStore2TestFixture);
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
ZEROES.FillWithZeroes();
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(OnDiskBlockCreateSizeTest, OnDiskBlockCreateSizeTest, Values(0, 1, 5, 1024, 10*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(OnDiskBlockCreateSizeTest, OnDiskBlockCreateSizeTest, Values(0, 1, 5, 1024, 10*1024*1024));
|
||||
|
||||
TEST_P(OnDiskBlockCreateSizeTest, OnDiskSizeIsCorrect) {
|
||||
Data fileContent = Data::LoadFromFile(file.path()).value();
|
||||
@ -85,4 +85,4 @@ TEST_P(OnDiskBlockCreateSizeTest, InMemorySizeIsCorrect) {
|
||||
TEST_P(OnDiskBlockCreateSizeTest, InMemoryBlockIsZeroedOut) {
|
||||
EXPECT_EQ(0, std::memcmp(ZEROES.data(), block->data(), block->size()));
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
EXPECT_EQ(randomData, fileContentWithoutHeader);
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(OnDiskBlockFlushTest, OnDiskBlockFlushTest, Values((size_t)0, (size_t)1, (size_t)1024, (size_t)4096, (size_t)10*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(OnDiskBlockFlushTest, OnDiskBlockFlushTest, Values((size_t)0, (size_t)1, (size_t)1024, (size_t)4096, (size_t)10*1024*1024));
|
||||
|
||||
// This test is also tested by OnDiskBlockStoreTest, but there the block is created using the BlockStore interface.
|
||||
// Here, we create it using OnDiskBlock::CreateOnDisk()
|
||||
@ -116,4 +116,4 @@ TEST_P(OnDiskBlockFlushTest, AfterLoad_FlushesWhenDestructed) {
|
||||
}
|
||||
EXPECT_STORED_FILE_DATA_CORRECT();
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
@ -56,7 +56,7 @@ public:
|
||||
EXPECT_EQ(0, std::memcmp(expected.data(), actual.data(), expected.size()));
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(OnDiskBlockLoadTest, OnDiskBlockLoadTest, Values(0, 1, 5, 1024, 10*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(OnDiskBlockLoadTest, OnDiskBlockLoadTest, Values(0, 1, 5, 1024, 10*1024*1024));
|
||||
|
||||
TEST_P(OnDiskBlockLoadTest, LoadsCorrectSize) {
|
||||
CreateBlockWithSize(GetParam());
|
||||
@ -79,4 +79,4 @@ TEST_F(OnDiskBlockLoadTest, LoadNotExistingBlock) {
|
||||
BlockId key2 = BlockId::FromString("272EE5517627CFA147A971A8E6E747E0");
|
||||
EXPECT_EQ(boost::none, OnDiskBlock::LoadFromDisk(dir.path(), key2));
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
@ -18,6 +18,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(ParallelAccess, BlockStoreTest, ParallelAccessBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(ParallelAccess, BlockStoreTest, ParallelAccessBlockStoreTestFixture);
|
||||
|
||||
//TODO Add specific tests ensuring that loading the same block twice doesn't load it twice from the underlying blockstore
|
||||
|
@ -16,4 +16,4 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(TestFake, BlockStoreTest, FakeBlockStoreTestFixture);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(TestFake, BlockStoreTest, FakeBlockStoreTestFixture);
|
||||
|
@ -53,7 +53,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(BlockStore2Test);
|
||||
TYPED_TEST_SUITE_P(BlockStore2Test);
|
||||
|
||||
TYPED_TEST_P(BlockStore2Test, givenNonEmptyBlockStore_whenCallingTryCreateOnExistingBlock_thenFails) {
|
||||
blockstore::BlockId blockId = this->blockStore->create(cpputils::Data(1024));
|
||||
@ -418,7 +418,7 @@ TYPED_TEST_P(BlockStore2Test, TryCreateTwoBlocksWithSameBlockIdAndBothNullSize)
|
||||
EXPECT_FALSE(blockStore->tryCreate(blockId, cpputils::Data(0)));
|
||||
}*/
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(BlockStore2Test,
|
||||
REGISTER_TYPED_TEST_SUITE_P(BlockStore2Test,
|
||||
givenNonEmptyBlockStore_whenCallingTryCreateOnExistingBlock_thenFails,
|
||||
givenEmptyBlockStore_whenCallingTryCreateOnNonExistingBlock_thenSucceeds,
|
||||
givenNonEmptyBlockStore_whenCallingTryCreateOnNonExistingBlock_thenSucceeds,
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(BlockStoreTest);
|
||||
TYPED_TEST_SUITE_P(BlockStoreTest);
|
||||
|
||||
TYPED_TEST_P(BlockStoreTest, TwoCreatedBlocksHaveDifferentBlockIds) {
|
||||
auto blockStore = this->fixture.createBlockStore();
|
||||
@ -341,7 +341,7 @@ TYPED_TEST_P(BlockStoreTest, TryCreateTwoBlocksWithSameBlockIdAndBothNullSize) {
|
||||
#include "BlockStoreTest_Data.h"
|
||||
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(BlockStoreTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(BlockStoreTest,
|
||||
CreatedBlockHasCorrectSize,
|
||||
LoadingUnchangedBlockHasCorrectSize,
|
||||
CreatedBlockData,
|
||||
|
@ -80,4 +80,4 @@ TEST_F(SCryptParametersTest, p_SaveAndLoad) {
|
||||
SCryptParameters cfg(Data(0), 0, 0, 16);
|
||||
SCryptParameters loaded = SaveAndLoad(cfg);
|
||||
EXPECT_EQ(16u, loaded.p());
|
||||
}
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(CipherTest);
|
||||
TYPED_TEST_SUITE_P(CipherTest);
|
||||
|
||||
constexpr std::array<unsigned int, 7> SIZES = {{0, 1, 100, 1024, 5000, 1048576, 20971520}};
|
||||
|
||||
@ -123,7 +123,7 @@ TYPED_TEST_P(CipherTest, TryDecryptDataThatIsMuchTooSmall_1) {
|
||||
this->ExpectDoesntDecrypt(tooSmallCiphertext);
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(CipherTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(CipherTest,
|
||||
Size,
|
||||
EncryptThenDecrypt_Zeroes,
|
||||
EncryptThenDecrypt_Data,
|
||||
@ -144,7 +144,7 @@ public:
|
||||
Data plaintext2 = CipherTest<Cipher>::CreateData(100 * 1024);
|
||||
};
|
||||
|
||||
TYPED_TEST_CASE_P(AuthenticatedCipherTest);
|
||||
TYPED_TEST_SUITE_P(AuthenticatedCipherTest);
|
||||
|
||||
TYPED_TEST_P(AuthenticatedCipherTest, ModifyFirstByte_Zeroes_Size1) {
|
||||
Data ciphertext = this->Encrypt(this->zeroes1);
|
||||
@ -210,7 +210,7 @@ TYPED_TEST_P(AuthenticatedCipherTest, TryDecryptRandomData) {
|
||||
this->ExpectDoesntDecrypt(this->plaintext2);
|
||||
}
|
||||
|
||||
REGISTER_TYPED_TEST_CASE_P(AuthenticatedCipherTest,
|
||||
REGISTER_TYPED_TEST_SUITE_P(AuthenticatedCipherTest,
|
||||
ModifyFirstByte_Zeroes_Size1,
|
||||
ModifyFirstByte_Zeroes,
|
||||
ModifyFirstByte_Data_Size1,
|
||||
@ -224,43 +224,43 @@ REGISTER_TYPED_TEST_CASE_P(AuthenticatedCipherTest,
|
||||
);
|
||||
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Fake, CipherTest, FakeAuthenticatedCipher);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Fake, AuthenticatedCipherTest, FakeAuthenticatedCipher);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Fake, CipherTest, FakeAuthenticatedCipher);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Fake, AuthenticatedCipherTest, FakeAuthenticatedCipher);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(AES256_CFB, CipherTest, AES256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(AES256_GCM, CipherTest, AES256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(AES256_GCM, AuthenticatedCipherTest, AES256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(AES128_CFB, CipherTest, AES128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(AES128_GCM, CipherTest, AES128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(AES128_GCM, AuthenticatedCipherTest, AES128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(AES256_CFB, CipherTest, AES256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(AES256_GCM, CipherTest, AES256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(AES256_GCM, AuthenticatedCipherTest, AES256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(AES128_CFB, CipherTest, AES128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(AES128_GCM, CipherTest, AES128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(AES128_GCM, AuthenticatedCipherTest, AES128_GCM);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Twofish256_CFB, CipherTest, Twofish256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Twofish256_GCM, CipherTest, Twofish256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Twofish256_GCM, AuthenticatedCipherTest, Twofish256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Twofish128_CFB, CipherTest, Twofish128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Twofish128_GCM, CipherTest, Twofish128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Twofish128_GCM, AuthenticatedCipherTest, Twofish128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Twofish256_CFB, CipherTest, Twofish256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Twofish256_GCM, CipherTest, Twofish256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Twofish256_GCM, AuthenticatedCipherTest, Twofish256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Twofish128_CFB, CipherTest, Twofish128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Twofish128_GCM, CipherTest, Twofish128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Twofish128_GCM, AuthenticatedCipherTest, Twofish128_GCM);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Serpent256_CFB, CipherTest, Serpent256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Serpent256_GCM, CipherTest, Serpent256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Serpent256_GCM, AuthenticatedCipherTest, Serpent256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Serpent128_CFB, CipherTest, Serpent128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Serpent128_GCM, CipherTest, Serpent128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Serpent128_GCM, AuthenticatedCipherTest, Serpent128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Serpent256_CFB, CipherTest, Serpent256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Serpent256_GCM, CipherTest, Serpent256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Serpent256_GCM, AuthenticatedCipherTest, Serpent256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Serpent128_CFB, CipherTest, Serpent128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Serpent128_GCM, CipherTest, Serpent128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Serpent128_GCM, AuthenticatedCipherTest, Serpent128_GCM);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Cast256_CFB, CipherTest, Cast256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Cast256_GCM, CipherTest, Cast256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Cast256_GCM, AuthenticatedCipherTest, Cast256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Cast256_CFB, CipherTest, Cast256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Cast256_GCM, CipherTest, Cast256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Cast256_GCM, AuthenticatedCipherTest, Cast256_GCM);
|
||||
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars448_CFB, CipherTest, Mars448_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars448_GCM, CipherTest, Mars448_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars448_GCM, AuthenticatedCipherTest, Mars448_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars256_CFB, CipherTest, Mars256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars256_GCM, CipherTest, Mars256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars256_GCM, AuthenticatedCipherTest, Mars256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars128_CFB, CipherTest, Mars128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars128_GCM, CipherTest, Mars128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_CASE_P(Mars128_GCM, AuthenticatedCipherTest, Mars128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars448_CFB, CipherTest, Mars448_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars448_GCM, CipherTest, Mars448_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars448_GCM, AuthenticatedCipherTest, Mars448_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars256_CFB, CipherTest, Mars256_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars256_GCM, CipherTest, Mars256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars256_GCM, AuthenticatedCipherTest, Mars256_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars128_CFB, CipherTest, Mars128_CFB); //CFB mode is not authenticated
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars128_GCM, CipherTest, Mars128_GCM);
|
||||
INSTANTIATE_TYPED_TEST_SUITE_P(Mars128_GCM, AuthenticatedCipherTest, Mars128_GCM);
|
||||
|
||||
|
||||
// Test cipher names
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "cpp-utils/data/DataFixture.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "cpp-utils/data/Data.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -57,7 +57,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(DataTestWithSizeParam, DataTestWithSizeParam, Values(0, 1, 2, 1024, 4096, 10*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(DataTestWithSizeParam, DataTestWithSizeParam, Values(0, 1, 2, 1024, 4096, 10*1024*1024));
|
||||
|
||||
TEST_P(DataTestWithSizeParam, ZeroInitializedDataIsDifferentToRandomData) {
|
||||
if (GetParam() != 0) {
|
||||
@ -215,7 +215,7 @@ TEST_F(DataTest, LoadingNonexistingFile) {
|
||||
}
|
||||
|
||||
class DataTestWithStringParam: public DataTest, public WithParamInterface<string> {};
|
||||
INSTANTIATE_TEST_CASE_P(DataTestWithStringParam, DataTestWithStringParam, Values("", "2898B4B8A13C0F0278CCE465DB", "6FFEBAD90C0DAA2B79628F0627CE9841"));
|
||||
INSTANTIATE_TEST_SUITE_P(DataTestWithStringParam, DataTestWithStringParam, Values("", "2898B4B8A13C0F0278CCE465DB", "6FFEBAD90C0DAA2B79628F0627CE9841"));
|
||||
|
||||
TEST_P(DataTestWithStringParam, FromAndToString) {
|
||||
Data data = Data::FromString(GetParam());
|
||||
|
@ -1,3 +1,3 @@
|
||||
#include "cpp-utils/data/FixedSizeData.h"
|
||||
|
||||
// Test the header can be included without needing additional dependencies
|
||||
// Test the header can be included without needing additional dependencies
|
||||
|
@ -66,7 +66,7 @@ TEST_F(FixedSizeDataTest, NotEqualsTrue) {
|
||||
}
|
||||
|
||||
class FixedSizeDataTestWithStringParam: public FixedSizeDataTest, public WithParamInterface<string> {};
|
||||
INSTANTIATE_TEST_CASE_P(FixedSizeDataTestWithStringParam, FixedSizeDataTestWithStringParam, Values("2898B4B8A13CA63CBE0F0278CCE465DB", "6FFEBAD90C0DAA2B79628F0627CE9841"));
|
||||
INSTANTIATE_TEST_SUITE_P(FixedSizeDataTestWithStringParam, FixedSizeDataTestWithStringParam, Values("2898B4B8A13CA63CBE0F0278CCE465DB", "6FFEBAD90C0DAA2B79628F0627CE9841"));
|
||||
|
||||
TEST_P(FixedSizeDataTestWithStringParam, FromAndToString) {
|
||||
FixedSizeData<SIZE> data = FixedSizeData<SIZE>::FromString(GetParam());
|
||||
@ -86,7 +86,7 @@ public:
|
||||
};
|
||||
const Data FixedSizeDataTestWithBinaryParam::VALUE1(DataFixture::generate(SIZE, 3));
|
||||
const Data FixedSizeDataTestWithBinaryParam::VALUE2(DataFixture::generate(SIZE, 4));
|
||||
INSTANTIATE_TEST_CASE_P(FixedSizeDataTestWithBinaryParam, FixedSizeDataTestWithBinaryParam, Values(&FixedSizeDataTestWithBinaryParam::VALUE1, &FixedSizeDataTestWithBinaryParam::VALUE2));
|
||||
INSTANTIATE_TEST_SUITE_P(FixedSizeDataTestWithBinaryParam, FixedSizeDataTestWithBinaryParam, Values(&FixedSizeDataTestWithBinaryParam::VALUE1, &FixedSizeDataTestWithBinaryParam::VALUE2));
|
||||
|
||||
TEST_P(FixedSizeDataTestWithBinaryParam, FromBinary) {
|
||||
FixedSizeData<SIZE> data = FixedSizeData<SIZE>::FromBinary(GetParam()->data());
|
||||
@ -109,7 +109,7 @@ TEST_P(FixedSizeDataTestWithBinaryParam, ToAndFromBinary) {
|
||||
}
|
||||
|
||||
class FixedSizeDataTestWithParam: public FixedSizeDataTest, public WithParamInterface<FixedSizeData<FixedSizeDataTest::SIZE>> {};
|
||||
INSTANTIATE_TEST_CASE_P(FixedSizeDataTestWithParam, FixedSizeDataTestWithParam, Values(FixedSizeData<FixedSizeDataTest::SIZE>::FromString("2898B4B8A13CA63CBE0F0278CCE465DB"), FixedSizeData<FixedSizeDataTest::SIZE>::FromString("6FFEBAD90C0DAA2B79628F0627CE9841")));
|
||||
INSTANTIATE_TEST_SUITE_P(FixedSizeDataTestWithParam, FixedSizeDataTestWithParam, Values(FixedSizeData<FixedSizeDataTest::SIZE>::FromString("2898B4B8A13CA63CBE0F0278CCE465DB"), FixedSizeData<FixedSizeDataTest::SIZE>::FromString("6FFEBAD90C0DAA2B79628F0627CE9841")));
|
||||
|
||||
TEST_P(FixedSizeDataTestWithParam, CopyConstructor) {
|
||||
FixedSizeData<SIZE> copy(GetParam());
|
||||
|
@ -182,4 +182,4 @@ TEST_F(ConsoleTest_Ask, InputNonNumbers) {
|
||||
EXPECT_OUTPUT_LINE("Your choice [1-2]", ':', " ");
|
||||
sendInputLine("2");
|
||||
EXPECT_EQ(1u, chosen.get());
|
||||
}
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ namespace IdValueTypeTest_constexpr_test_extras {
|
||||
template<class Type> class IdValueTypeTest : public testing::Test {
|
||||
};
|
||||
using IdValueTypeTest_types = testing::Types<MyIdValueType, MyOrderedIdValueType, MyQuantityValueType, MyFlagsValueType>;
|
||||
TYPED_TEST_CASE(IdValueTypeTest, IdValueTypeTest_types);
|
||||
TYPED_TEST_SUITE(IdValueTypeTest, IdValueTypeTest_types);
|
||||
|
||||
|
||||
TYPED_TEST(IdValueTypeTest, Equality) {
|
||||
@ -207,7 +207,7 @@ namespace OrderedIdValueTypeTest_constexpr_test_extras {
|
||||
|
||||
template<class Type> class OrderedIdValueTypeTest : public testing::Test {};
|
||||
using OrderedIdValueTypeTest_types = testing::Types<MyOrderedIdValueType, MyQuantityValueType>;
|
||||
TYPED_TEST_CASE(OrderedIdValueTypeTest, OrderedIdValueTypeTest_types);
|
||||
TYPED_TEST_SUITE(OrderedIdValueTypeTest, OrderedIdValueTypeTest_types);
|
||||
|
||||
TYPED_TEST(OrderedIdValueTypeTest, LessThan) {
|
||||
TypeParam a(3);
|
||||
@ -310,7 +310,7 @@ namespace QuantityValueTypeTest_constexpr_test {
|
||||
|
||||
template<class Type> class QuantityValueTypeTest : public testing::Test {};
|
||||
using QuantityValueTypeTest_types = testing::Types<MyQuantityValueType>;
|
||||
TYPED_TEST_CASE(QuantityValueTypeTest, QuantityValueTypeTest_types);
|
||||
TYPED_TEST_SUITE(QuantityValueTypeTest, QuantityValueTypeTest_types);
|
||||
|
||||
TYPED_TEST(QuantityValueTypeTest, PreIncrement) {
|
||||
TypeParam a(3);
|
||||
@ -437,7 +437,7 @@ namespace FlagsValueTypeTest_constexpr_test {
|
||||
|
||||
template<class Type> class FlagsValueTypeTest : public testing::Test {};
|
||||
using FlagsValueType_types = testing::Types<MyFlagsValueType>;
|
||||
TYPED_TEST_CASE(FlagsValueTypeTest, FlagsValueType_types);
|
||||
TYPED_TEST_SUITE(FlagsValueTypeTest, FlagsValueType_types);
|
||||
|
||||
TYPED_TEST(FlagsValueTypeTest, Invert) {
|
||||
TypeParam a(3);
|
||||
|
@ -36,4 +36,4 @@ TEST_F(CliTest_Setup, FuseOptionGiven) {
|
||||
//Specify --cipher parameter to make it non-interactive
|
||||
//TODO Remove "-f" parameter, once EXPECT_RUN_SUCCESS can handle that
|
||||
EXPECT_RUN_SUCCESS({basedir.string().c_str(), mountdir.string().c_str(), "-f", "--cipher", "aes-256-gcm", "--", "-f"}, mountdir);
|
||||
}
|
||||
}
|
||||
|
@ -72,14 +72,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(DefaultParams, CliTest_WrongEnvironment, Values(TestConfig({false, false, false})));
|
||||
INSTANTIATE_TEST_CASE_P(ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, false})));
|
||||
INSTANTIATE_TEST_CASE_P(LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({false, true, false})));
|
||||
INSTANTIATE_TEST_CASE_P(ExternalConfigfile_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({true, true, false})));
|
||||
INSTANTIATE_TEST_CASE_P(RunningInForeground, CliTest_WrongEnvironment, Values(TestConfig({false, false, true})));
|
||||
INSTANTIATE_TEST_CASE_P(RunningInForeground_ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, true})));
|
||||
INSTANTIATE_TEST_CASE_P(RunningInForeground_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({false, true, true})));
|
||||
INSTANTIATE_TEST_CASE_P(RunningInForeground_ExternalConfigfile_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({true, true, true})));
|
||||
INSTANTIATE_TEST_SUITE_P(DefaultParams, CliTest_WrongEnvironment, Values(TestConfig({false, false, false})));
|
||||
INSTANTIATE_TEST_SUITE_P(ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, false})));
|
||||
INSTANTIATE_TEST_SUITE_P(LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({false, true, false})));
|
||||
INSTANTIATE_TEST_SUITE_P(ExternalConfigfile_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({true, true, false})));
|
||||
INSTANTIATE_TEST_SUITE_P(RunningInForeground, CliTest_WrongEnvironment, Values(TestConfig({false, false, true})));
|
||||
INSTANTIATE_TEST_SUITE_P(RunningInForeground_ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, true})));
|
||||
INSTANTIATE_TEST_SUITE_P(RunningInForeground_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({false, true, true})));
|
||||
INSTANTIATE_TEST_SUITE_P(RunningInForeground_ExternalConfigfile_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({true, true, true})));
|
||||
|
||||
//Counter-Test. Test that it doesn't fail if we call it without an error condition.
|
||||
TEST_P(CliTest_WrongEnvironment, NoErrorCondition) {
|
||||
@ -239,4 +239,4 @@ TEST_P(CliTest_WrongEnvironment, MountDir_NoPermission) {
|
||||
SetNoPermission(mountdir);
|
||||
Test_Run_Error("Error 17: Could not write to mount directory", ErrorCode::InaccessibleMountDir);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -111,4 +111,4 @@ TEST_P(CryConfigConsoleTest_Cipher_Choose, ChoosesCipherCorrectly) {
|
||||
EXPECT_EQ(cipherName, chosenCipher);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(CryConfigConsoleTest_Cipher_Choose, CryConfigConsoleTest_Cipher_Choose, ValuesIn(CryCiphers::supportedCipherNames()));
|
||||
INSTANTIATE_TEST_SUITE_P(CryConfigConsoleTest_Cipher_Choose, CryConfigConsoleTest_Cipher_Choose, ValuesIn(CryCiphers::supportedCipherNames()));
|
||||
|
@ -13,7 +13,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseAccessErrorTest: public FuseAccessTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseAccessErrorTest, FuseAccessErrorTest, Values(EACCES, ELOOP, ENAMETOOLONG, ENOENT, ENOTDIR, EROFS, EFAULT, EINVAL, EIO, ENOMEM, ETXTBSY));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseAccessErrorTest, FuseAccessErrorTest, Values(EACCES, ELOOP, ENAMETOOLONG, ENOENT, ENOTDIR, EROFS, EFAULT, EINVAL, EIO, ENOMEM, ETXTBSY));
|
||||
|
||||
TEST_P(FuseAccessErrorTest, ReturnedErrorIsCorrect) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -7,7 +7,7 @@ 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));
|
||||
INSTANTIATE_TEST_SUITE_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) {
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
fd->release(); // don't try closing it again
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseCloseTest, FuseCloseTest, Values(0, 1, 2, 100, 1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseCloseTest, FuseCloseTest, Values(0, 1, 2, 100, 1024*1024*1024));
|
||||
|
||||
//TODO Figure out what's wrong and enable this test
|
||||
//Disabled, because it is flaky. libfuse seems to not send the release() event sometimes.
|
||||
|
@ -13,7 +13,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseCreateAndOpenErrorTest: public FuseCreateAndOpenTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseCreateAndOpenErrorTest, FuseCreateAndOpenErrorTest, Values(EACCES, EDQUOT, EEXIST, EFAULT, EFBIG, EINTR, EOVERFLOW, EINVAL, EISDIR, ELOOP, EMFILE, ENAMETOOLONG, ENFILE, ENODEV, ENOENT, ENOMEM, ENOSPC, ENOTDIR, ENXIO, EOPNOTSUPP, EPERM, EROFS, ETXTBSY, EWOULDBLOCK, EBADF, ENOTDIR));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseCreateAndOpenErrorTest, FuseCreateAndOpenErrorTest, Values(EACCES, EDQUOT, EEXIST, EFAULT, EFBIG, EINTR, EOVERFLOW, EINVAL, EISDIR, ELOOP, EMFILE, ENAMETOOLONG, ENFILE, ENODEV, ENOENT, ENOMEM, ENOSPC, ENOTDIR, ENXIO, EOPNOTSUPP, EPERM, EROFS, ETXTBSY, EWOULDBLOCK, EBADF, ENOTDIR));
|
||||
|
||||
TEST_F(FuseCreateAndOpenErrorTest, ReturnNoError) {
|
||||
ReturnDoesntExistOnLstat(FILENAME);
|
||||
|
@ -30,7 +30,7 @@ private:
|
||||
EXPECT_EQ(1, retval) << "Reading file failed";
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseCreateAndOpenFileDescriptorTest, FuseCreateAndOpenFileDescriptorTest, Values(0, 2, 5, 1000, 1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseCreateAndOpenFileDescriptorTest, FuseCreateAndOpenFileDescriptorTest, Values(0, 2, 5, 1000, 1024*1024*1024));
|
||||
|
||||
TEST_P(FuseCreateAndOpenFileDescriptorTest, TestReturnedFileDescriptor) {
|
||||
ReturnDoesntExistOnLstat(FILENAME);
|
||||
|
@ -5,7 +5,7 @@ using ::testing::Values;
|
||||
|
||||
class FuseCreateAndOpenFlagsTest: public FuseCreateAndOpenTest, public WithParamInterface<mode_t> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseCreateAndOpenFlagsTest, FuseCreateAndOpenFlagsTest, Values(O_RDWR, O_RDONLY, O_WRONLY));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseCreateAndOpenFlagsTest, FuseCreateAndOpenFlagsTest, Values(O_RDWR, O_RDONLY, O_WRONLY));
|
||||
|
||||
//TODO Disabled because it doesn't seem to work. Fuse doesn't seem to pass flags to create(). Why?
|
||||
/*TEST_P(FuseCreateAndOpenFlagsTest, testFlags) {
|
||||
|
@ -10,7 +10,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseFdatasyncErrorTest: public FuseFdatasyncTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFdatasyncErrorTest, FuseFdatasyncErrorTest, Values(EBADF, EIO, EROFS, EINVAL));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFdatasyncErrorTest, FuseFdatasyncErrorTest, Values(EBADF, EIO, EROFS, EINVAL));
|
||||
|
||||
TEST_P(FuseFdatasyncErrorTest, ReturnedErrorIsCorrect) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -11,7 +11,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseFdatasyncFileDescriptorTest: public FuseFdatasyncTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFdatasyncFileDescriptorTest, FuseFdatasyncFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFdatasyncFileDescriptorTest, FuseFdatasyncFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
|
||||
|
||||
TEST_P(FuseFdatasyncFileDescriptorTest, FileDescriptorIsCorrect) {
|
||||
|
@ -14,7 +14,7 @@ using fspp::fuse::FuseErrnoException;
|
||||
|
||||
class FuseFlushErrorTest: public FuseFlushTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFlushErrorTest, FuseFlushErrorTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFlushErrorTest, FuseFlushErrorTest, Values(
|
||||
EBADF,
|
||||
#if defined(__GLIBC__) || defined(__APPLE__)
|
||||
// musl has different handling for EINTR, see https://ewontfix.com/4/
|
||||
|
@ -22,7 +22,7 @@ using std::string;
|
||||
|
||||
class FuseFlushFileDescriptorTest: public FuseFlushTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFlushFileDescriptorTest, FuseFlushFileDescriptorTest, Values(0, 1, 2, 100, 1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFlushFileDescriptorTest, FuseFlushFileDescriptorTest, Values(0, 1, 2, 100, 1024*1024*1024));
|
||||
|
||||
TEST_P(FuseFlushFileDescriptorTest, FlushOnCloseFile) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
return make_unique_ref<OpenFileHandle>(real_path.string().c_str(), O_RDWR | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
||||
}*/
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFstatErrorTest, FuseFstatErrorTest, Values(EACCES, EBADF, EFAULT, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EOVERFLOW));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFstatErrorTest, FuseFstatErrorTest, Values(EACCES, EBADF, EFAULT, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EOVERFLOW));
|
||||
|
||||
TEST_P(FuseFstatErrorTest, ReturnedErrorCodeIsCorrect) {
|
||||
ReturnDoesntExistOnLstat(FILENAME);
|
||||
|
@ -21,7 +21,7 @@ public:
|
||||
CreateFile(fs.get(), filename);
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFstatParameterTest, FuseFstatParameterTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFstatParameterTest, FuseFstatParameterTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
|
||||
|
||||
TEST_P(FuseFstatParameterTest, FileDescriptorIsCorrect) {
|
||||
|
@ -3,4 +3,4 @@ Cite from FUSE documentation on the fgetattr function:
|
||||
Later it may be called for invocations of fstat() too.
|
||||
So we need to issue a create to get our fstat called.
|
||||
Since fstat is currently only called after create, we can't call it directly.
|
||||
So we can't test the returned values.
|
||||
So we can't test the returned values.
|
||||
|
@ -10,7 +10,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseFsyncErrorTest: public FuseFsyncTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFsyncErrorTest, FuseFsyncErrorTest, Values(EBADF, EIO, EROFS, EINVAL));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFsyncErrorTest, FuseFsyncErrorTest, Values(EBADF, EIO, EROFS, EINVAL));
|
||||
|
||||
TEST_P(FuseFsyncErrorTest, ReturnedErrorIsCorrect) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -11,7 +11,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseFsyncFileDescriptorTest: public FuseFsyncTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFsyncFileDescriptorTest, FuseFsyncFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFsyncFileDescriptorTest, FuseFsyncFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
|
||||
|
||||
TEST_P(FuseFsyncFileDescriptorTest, FileDescriptorIsCorrect) {
|
||||
|
@ -11,7 +11,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseFTruncateErrorTest: public FuseFTruncateTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFTruncateErrorTest, FuseFTruncateErrorTest, Values(EACCES, EFAULT, EFBIG, EINTR, EINVAL, EIO, EISDIR, ELOOP, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS, ETXTBSY, EBADF));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFTruncateErrorTest, FuseFTruncateErrorTest, Values(EACCES, EFAULT, EFBIG, EINTR, EINVAL, EIO, EISDIR, ELOOP, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS, ETXTBSY, EBADF));
|
||||
|
||||
TEST_P(FuseFTruncateErrorTest, ReturnedErrorIsCorrect) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -12,7 +12,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseFTruncateFileDescriptorTest: public FuseFTruncateTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFTruncateFileDescriptorTest, FuseFTruncateFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFTruncateFileDescriptorTest, FuseFTruncateFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
|
||||
|
||||
TEST_P(FuseFTruncateFileDescriptorTest, FileDescriptorIsCorrect) {
|
||||
|
@ -7,7 +7,7 @@ using ::testing::Values;
|
||||
|
||||
class FuseFTruncateSizeTest: public FuseFTruncateTest, public WithParamInterface<fspp::num_bytes_t> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseFTruncateSizeTest, FuseFTruncateSizeTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseFTruncateSizeTest, FuseFTruncateSizeTest, Values(
|
||||
fspp::num_bytes_t(0),
|
||||
fspp::num_bytes_t(1),
|
||||
fspp::num_bytes_t(10),
|
||||
|
@ -14,7 +14,7 @@ using fspp::fuse::FuseErrnoException;
|
||||
class FuseLstatErrorTest: public FuseLstatTest, public WithParamInterface<int> {
|
||||
public:
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(LstatErrorCodes, FuseLstatErrorTest, Values(EACCES, EBADF, EFAULT, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EOVERFLOW, EINVAL, ENOTDIR));
|
||||
INSTANTIATE_TEST_SUITE_P(LstatErrorCodes, FuseLstatErrorTest, Values(EACCES, EBADF, EFAULT, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EOVERFLOW, EINVAL, ENOTDIR));
|
||||
|
||||
TEST_F(FuseLstatErrorTest, ReturnNoError) {
|
||||
EXPECT_CALL(*fsimpl, lstat(StrEq(FILENAME), _)).Times(AtLeast(1)).WillRepeatedly(ReturnIsFile);
|
||||
|
@ -11,7 +11,7 @@ private:
|
||||
stat->st_atim.tv_nsec = 0;
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnATimeTest, FuseLstatReturnATimeTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnATimeTest, FuseLstatReturnATimeTest, Values(
|
||||
0,
|
||||
100,
|
||||
1416496809, // current timestamp as of writing the test
|
||||
|
@ -11,7 +11,7 @@ private:
|
||||
stat->st_ctim.tv_nsec = 0;
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnCtimeTest, FuseLstatReturnCtimeTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnCtimeTest, FuseLstatReturnCtimeTest, Values(
|
||||
0,
|
||||
100,
|
||||
1416496809, // current timestamp as of writing the test
|
||||
|
@ -9,7 +9,7 @@ private:
|
||||
stat->st_gid = value;
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnGidTest, FuseLstatReturnGidTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnGidTest, FuseLstatReturnGidTest, Values(
|
||||
0,
|
||||
10
|
||||
));
|
||||
|
@ -11,7 +11,7 @@ public:
|
||||
});
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnModeTest, FuseLstatReturnModeTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnModeTest, FuseLstatReturnModeTest, Values(
|
||||
S_IFREG,
|
||||
S_IFDIR,
|
||||
S_IFREG | S_IRUSR | S_IWGRP | S_IXOTH, // a file with some access bits set
|
||||
|
@ -11,7 +11,7 @@ private:
|
||||
stat->st_mtim.tv_nsec = 0;
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnMtimeTest, FuseLstatReturnMtimeTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnMtimeTest, FuseLstatReturnMtimeTest, Values(
|
||||
0,
|
||||
100,
|
||||
1416496809, // current timestamp as of writing the test
|
||||
|
@ -9,7 +9,7 @@ private:
|
||||
stat->st_nlink = value;
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnNlinkTest, FuseLstatReturnNlinkTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnNlinkTest, FuseLstatReturnNlinkTest, Values(
|
||||
1,
|
||||
2,
|
||||
5,
|
||||
|
@ -9,7 +9,7 @@ private:
|
||||
stat->st_size = value.value();
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnSizeTest, FuseLstatReturnSizeTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnSizeTest, FuseLstatReturnSizeTest, Values(
|
||||
fspp::num_bytes_t(0),
|
||||
fspp::num_bytes_t(1),
|
||||
fspp::num_bytes_t(4096),
|
||||
|
@ -9,7 +9,7 @@ private:
|
||||
stat->st_uid = value;
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseLstatReturnUidTest, FuseLstatReturnUidTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseLstatReturnUidTest, FuseLstatReturnUidTest, Values(
|
||||
0,
|
||||
10
|
||||
));
|
||||
|
@ -12,7 +12,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseMkdirErrorTest: public FuseMkdirTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseMkdirErrorTest, FuseMkdirErrorTest, Values(EACCES, EDQUOT, EEXIST, EFAULT, ELOOP, EMLINK, ENAMETOOLONG, ENOENT, ENOMEM, ENOSPC, ENOTDIR, EPERM, EROFS, EBADF));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseMkdirErrorTest, FuseMkdirErrorTest, Values(EACCES, EDQUOT, EEXIST, EFAULT, ELOOP, EMLINK, ENAMETOOLONG, ENOENT, ENOMEM, ENOSPC, ENOTDIR, EPERM, EROFS, EBADF));
|
||||
|
||||
TEST_F(FuseMkdirErrorTest, NoError) {
|
||||
ReturnDoesntExistOnLstat(DIRNAME);
|
||||
|
@ -7,7 +7,7 @@ using ::testing::Values;
|
||||
|
||||
class FuseMkdirModeTest: public FuseMkdirTest, public WithParamInterface<mode_t> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseMkdirModeTest, FuseMkdirModeTest, Values(0, S_IRUSR, S_IRGRP, S_IXOTH, S_IRUSR|S_IRGRP|S_IROTH|S_IRGRP));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseMkdirModeTest, FuseMkdirModeTest, Values(0, S_IRUSR, S_IRGRP, S_IXOTH, S_IRUSR|S_IRGRP|S_IROTH|S_IRGRP));
|
||||
|
||||
|
||||
TEST_P(FuseMkdirModeTest, Mkdir) {
|
||||
|
@ -13,7 +13,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseOpenErrorTest: public FuseOpenTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseOpenErrorTest, FuseOpenErrorTest, Values(EACCES, EDQUOT, EEXIST, EFAULT, EFBIG, EINTR, EOVERFLOW, EINVAL, EISDIR, ELOOP, EMFILE, ENAMETOOLONG, ENFILE, ENODEV, ENOENT, ENOMEM, ENOSPC, ENOTDIR, ENXIO, EOPNOTSUPP, EPERM, EROFS, ETXTBSY, EWOULDBLOCK, EBADF, ENOTDIR));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseOpenErrorTest, FuseOpenErrorTest, Values(EACCES, EDQUOT, EEXIST, EFAULT, EFBIG, EINTR, EOVERFLOW, EINVAL, EISDIR, ELOOP, EMFILE, ENAMETOOLONG, ENFILE, ENODEV, ENOENT, ENOMEM, ENOSPC, ENOTDIR, ENXIO, EOPNOTSUPP, EPERM, EROFS, ETXTBSY, EWOULDBLOCK, EBADF, ENOTDIR));
|
||||
|
||||
TEST_F(FuseOpenErrorTest, ReturnNoError) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -30,7 +30,7 @@ private:
|
||||
EXPECT_EQ(1, retval) << "Reading file failed";
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseOpenFileDescriptorTest, FuseOpenFileDescriptorTest, Values(0, 2, 5, 1000, 1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseOpenFileDescriptorTest, FuseOpenFileDescriptorTest, Values(0, 2, 5, 1000, 1024*1024*1024));
|
||||
|
||||
TEST_P(FuseOpenFileDescriptorTest, TestReturnedFileDescriptor) {
|
||||
ReturnIsFileOnLstatWithSize(FILENAME, fspp::num_bytes_t(1));
|
||||
|
@ -7,7 +7,7 @@ using ::testing::Return;
|
||||
|
||||
class FuseOpenFlagsTest: public FuseOpenTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseOpenFlagsTest, FuseOpenFlagsTest, Values(O_RDWR, O_RDONLY, O_WRONLY));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseOpenFlagsTest, FuseOpenFlagsTest, Values(O_RDWR, O_RDONLY, O_WRONLY));
|
||||
|
||||
TEST_P(FuseOpenFlagsTest, testFlags) {
|
||||
ReturnIsFileOnLstat(FILENAME);
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
OnOpenReturnFileDescriptor(FILENAME, 0);
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseReadErrorTest, FuseReadErrorTest, Values(EAGAIN, EBADF, EFAULT, EINTR, EINVAL, EIO, EISDIR, EOVERFLOW, ESPIPE, ENXIO));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseReadErrorTest, FuseReadErrorTest, Values(EAGAIN, EBADF, EFAULT, EINTR, EINVAL, EIO, EISDIR, EOVERFLOW, ESPIPE, ENXIO));
|
||||
|
||||
|
||||
TEST_P(FuseReadErrorTest, ReturnErrorOnFirstReadCall) {
|
||||
|
@ -11,7 +11,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseReadFileDescriptorTest: public FuseReadTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseReadFileDescriptorTest, FuseReadFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseReadFileDescriptorTest, FuseReadFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
|
||||
|
||||
|
||||
TEST_P(FuseReadFileDescriptorTest, FileDescriptorIsCorrect) {
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
return testFile->read(buf, count, offset);
|
||||
});
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseReadReturnedDataTest, FuseReadReturnedDataTest, Combine(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseReadReturnedDataTest, FuseReadReturnedDataTest, Combine(
|
||||
Values(fspp::num_bytes_t(0), fspp::num_bytes_t(1), fspp::num_bytes_t(10), fspp::num_bytes_t(1000), fspp::num_bytes_t(1024), fspp::num_bytes_t(10*1024*1024)),
|
||||
Values(fspp::num_bytes_t(0), fspp::num_bytes_t(1), fspp::num_bytes_t(10), fspp::num_bytes_t(1024), fspp::num_bytes_t(10*1024*1024)),
|
||||
Values(fspp::num_bytes_t(0), fspp::num_bytes_t(1), fspp::num_bytes_t(10), fspp::num_bytes_t(1024), fspp::num_bytes_t(10*1024*1024))
|
||||
|
@ -13,7 +13,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseReadDirErrorTest: public FuseReadDirTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseReadDirErrorTest, FuseReadDirErrorTest, Values(EACCES, EBADF, EMFILE, ENFILE, ENOMEM, ENOTDIR, EFAULT, EINVAL));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseReadDirErrorTest, FuseReadDirErrorTest, Values(EACCES, EBADF, EMFILE, ENFILE, ENOMEM, ENOTDIR, EFAULT, EINVAL));
|
||||
|
||||
//TODO On ENOENT, libfuse doesn't return the ENOENT error, but returns a success response with an empty directory. Why?
|
||||
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
EXPECT_EQ(direntries, *returned_dir_entries);
|
||||
}
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseReadDirReturnTest, FuseReadDirReturnTest, Values(
|
||||
INSTANTIATE_TEST_SUITE_P(FuseReadDirReturnTest, FuseReadDirReturnTest, Values(
|
||||
vector<string>({}),
|
||||
vector<string>({"oneentry"}),
|
||||
vector<string>({"twoentries_1", "twoentries_2"}),
|
||||
|
@ -10,7 +10,7 @@ using namespace fspp::fuse;
|
||||
|
||||
class FuseRenameErrorTest: public FuseRenameTest, public WithParamInterface<int> {
|
||||
};
|
||||
INSTANTIATE_TEST_CASE_P(FuseRenameErrorTest, FuseRenameErrorTest, Values(EACCES, EBUSY, EDQUOT, EFAULT, EINVAL, EISDIR, ELOOP, EMLINK, ENAMETOOLONG, ENOENT, ENOMEM, ENOSPC, ENOTDIR, ENOTEMPTY, EEXIST, EPERM, EROFS, EXDEV, EBADF, ENOTDIR));
|
||||
INSTANTIATE_TEST_SUITE_P(FuseRenameErrorTest, FuseRenameErrorTest, Values(EACCES, EBUSY, EDQUOT, EFAULT, EINVAL, EISDIR, ELOOP, EMLINK, ENAMETOOLONG, ENOENT, ENOMEM, ENOSPC, ENOTDIR, ENOTEMPTY, EEXIST, EPERM, EROFS, EXDEV, EBADF, ENOTDIR));
|
||||
|
||||
TEST_P(FuseRenameErrorTest, ReturnedErrorIsCorrect) {
|
||||
ReturnIsFileOnLstat(FILENAME1);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user