Fix googletest deprecations

This commit is contained in:
Sebastian Messmer 2019-10-13 19:16:06 +07:00
parent 7d8cdbba40
commit bb4c10770a
120 changed files with 254 additions and 254 deletions

View File

@ -18,24 +18,24 @@
#include "FsppOpenFileTest_Timestamps.h" #include "FsppOpenFileTest_Timestamps.h"
#define FSPP_ADD_FILESYTEM_TESTS(FS_NAME, FIXTURE) \ #define FSPP_ADD_FILESYTEM_TESTS(FS_NAME, FIXTURE) \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDeviceTest_One, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDeviceTest_One, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDeviceTest_Two, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDeviceTest_Two, FIXTURE); \
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppDeviceTest_Timestamps, FIXTURE); \ INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppDeviceTest_Timestamps, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDirTest, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDirTest, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppDirTest_Timestamps, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppDirTest_Timestamps, FIXTURE); \
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppDirTest_Timestamps_Entries, FIXTURE); \ INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppDirTest_Timestamps_Entries, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppFileTest, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppFileTest, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppFileTest_Timestamps, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppFileTest_Timestamps, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppSymlinkTest, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppSymlinkTest, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppSymlinkTest_Timestamps, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppSymlinkTest_Timestamps, FIXTURE); \
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppNodeTest_Rename, FIXTURE); \ INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppNodeTest_Rename, FIXTURE); \
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppNodeTest_Stat, FIXTURE); \ INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppNodeTest_Stat, FIXTURE); \
INSTANTIATE_NODE_TEST_CASE( FS_NAME, FsppNodeTest_Timestamps, FIXTURE); \ INSTANTIATE_NODE_TEST_SUITE( FS_NAME, FsppNodeTest_Timestamps, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppNodeTest_Stat_FileOnly, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppNodeTest_Stat_FileOnly, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppNodeTest_Stat_DirOnly, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppNodeTest_Stat_DirOnly, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppNodeTest_Stat_SymlinkOnly, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppNodeTest_Stat_SymlinkOnly, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppOpenFileTest, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppOpenFileTest, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, FsppOpenFileTest_Timestamps, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, FsppOpenFileTest_Timestamps, FIXTURE); \
#endif #endif

View File

@ -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_One: public FsppDeviceTest<ConcreteFileSystemTestFixture> {};
template<class ConcreteFileSystemTestFixture> class FsppDeviceTest_Two: public FsppDeviceTest<ConcreteFileSystemTestFixture> {}; template<class ConcreteFileSystemTestFixture> class FsppDeviceTest_Two: public FsppDeviceTest<ConcreteFileSystemTestFixture> {};
TYPED_TEST_CASE_P(FsppDeviceTest_One); TYPED_TEST_SUITE_P(FsppDeviceTest_One);
TYPED_TEST_CASE_P(FsppDeviceTest_Two); TYPED_TEST_SUITE_P(FsppDeviceTest_Two);
TYPED_TEST_P(FsppDeviceTest_One, InitFilesystem) { TYPED_TEST_P(FsppDeviceTest_One, InitFilesystem) {
//fixture->createDevice() is called in the FileSystemTest constructor //fixture->createDevice() is called in the FileSystemTest constructor
@ -410,7 +410,7 @@ TYPED_TEST_P(FsppDeviceTest_Two, LoadSymlinkFromDir_Nesting2_LoadDir) {
//TODO Test statfs //TODO Test statfs
REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest_One, REGISTER_TYPED_TEST_SUITE_P(FsppDeviceTest_One,
InitFilesystem, InitFilesystem,
LoadRootDir_Load, LoadRootDir_Load,
LoadRootDir_LoadDir, LoadRootDir_LoadDir,
@ -462,7 +462,7 @@ REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest_One,
LoadSymlinkFromDir_Nesting1_LoadDir LoadSymlinkFromDir_Nesting1_LoadDir
); );
REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest_Two, REGISTER_TYPED_TEST_SUITE_P(FsppDeviceTest_Two,
LoadFileFromDir_Nesting2_Load, LoadFileFromDir_Nesting2_Load,
LoadFileFromDir_Nesting2_LoadFile, LoadFileFromDir_Nesting2_LoadFile,
LoadFileFromDir_Nesting2_LoadDir, LoadFileFromDir_Nesting2_LoadDir,

View File

@ -35,7 +35,7 @@ public:
} }
}; };
REGISTER_NODE_TEST_CASE(FsppDeviceTest_Timestamps, REGISTER_NODE_TEST_SUITE(FsppDeviceTest_Timestamps,
Load_While_Loaded, Load_While_Loaded,
Load_While_Not_Loaded Load_While_Not_Loaded
); );

View File

@ -46,7 +46,7 @@ public:
EXPECT_TRUE(false); EXPECT_TRUE(false);
} }
}; };
TYPED_TEST_CASE_P(FsppDirTest); TYPED_TEST_SUITE_P(FsppDirTest);
inline fspp::Dir::Entry DirEntry(const std::string &name) { inline fspp::Dir::Entry DirEntry(const std::string &name) {
return fspp::Dir::Entry(fspp::Dir::EntryType::DIR, 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")); 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_Empty,
Children_RootDir_OneFile_Directly, Children_RootDir_OneFile_Directly,
Children_RootDir_OneFile_AfterReloadingDir, Children_RootDir_OneFile_AfterReloadingDir,

View File

@ -8,7 +8,7 @@ template<class ConcreteFileSystemTestFixture>
class FsppDirTest_Timestamps: public TimestampTestUtils<ConcreteFileSystemTestFixture> { class FsppDirTest_Timestamps: public TimestampTestUtils<ConcreteFileSystemTestFixture> {
public: public:
}; };
TYPED_TEST_CASE_P(FsppDirTest_Timestamps); TYPED_TEST_SUITE_P(FsppDirTest_Timestamps);
TYPED_TEST_P(FsppDirTest_Timestamps, createAndOpenFile) { TYPED_TEST_P(FsppDirTest_Timestamps, createAndOpenFile) {
auto dir = this->CreateDir("/mydir"); 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,
createAndOpenFile_TimestampsOfCreatedFile, createAndOpenFile_TimestampsOfCreatedFile,
createDir, createDir,
@ -243,7 +243,7 @@ REGISTER_TYPED_TEST_CASE_P(FsppDirTest_Timestamps,
children_nonempty children_nonempty
); );
REGISTER_NODE_TEST_CASE(FsppDirTest_Timestamps_Entries, REGISTER_NODE_TEST_SUITE(FsppDirTest_Timestamps_Entries,
deleteChild, deleteChild,
renameChild, renameChild,
moveChildIn, moveChildIn,

View File

@ -89,7 +89,7 @@ public:
} }
}; };
TYPED_TEST_CASE_P(FsppFileTest); TYPED_TEST_SUITE_P(FsppFileTest);
TYPED_TEST_P(FsppFileTest, Open_RDONLY) { TYPED_TEST_P(FsppFileTest, Open_RDONLY) {
this->Test_Open_RDONLY(this->file_root.get()); 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")); 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,
Open_RDONLY_Nested, Open_RDONLY_Nested,
Open_WRONLY, Open_WRONLY,

View File

@ -14,7 +14,7 @@ public:
return file; return file;
} }
}; };
TYPED_TEST_CASE_P(FsppFileTest_Timestamps); TYPED_TEST_SUITE_P(FsppFileTest_Timestamps);
TYPED_TEST_P(FsppFileTest_Timestamps, open_nomode) { TYPED_TEST_P(FsppFileTest_Timestamps, open_nomode) {
auto file = this->CreateFile("/myfile"); 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}); 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_nomode,
open_rdonly, open_rdonly,
open_wronly, open_wronly,

View File

@ -210,7 +210,7 @@ public:
} }
}; };
REGISTER_NODE_TEST_CASE(FsppNodeTest_Rename, REGISTER_NODE_TEST_SUITE(FsppNodeTest_Rename,
Error_TargetParentDirDoesntExist, Error_TargetParentDirDoesntExist,
Error_TargetParentDirIsFile, Error_TargetParentDirIsFile,
Error_RootDir, Error_RootDir,

View File

@ -21,7 +21,7 @@ public:
template<class ConcreteFileSystemTestFixture> template<class ConcreteFileSystemTestFixture>
class FsppNodeTest_Stat_FileOnly: public FileSystemTest<ConcreteFileSystemTestFixture>, public FsppNodeTestHelper {}; 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) { TYPED_TEST_P(FsppNodeTest_Stat_FileOnly, CreatedFileIsEmpty) {
this->CreateFile("/myfile"); this->CreateFile("/myfile");
@ -41,7 +41,7 @@ TYPED_TEST_P(FsppNodeTest_Stat_FileOnly, FileIsFile) {
template<class ConcreteFileSystemTestFixture> template<class ConcreteFileSystemTestFixture>
class FsppNodeTest_Stat_DirOnly: public FileSystemTest<ConcreteFileSystemTestFixture>, public FsppNodeTestHelper {}; 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) { TYPED_TEST_P(FsppNodeTest_Stat_DirOnly, DirIsDir) {
this->CreateDir("/mydir"); this->CreateDir("/mydir");
@ -55,7 +55,7 @@ TYPED_TEST_P(FsppNodeTest_Stat_DirOnly, DirIsDir) {
template<class ConcreteFileSystemTestFixture> template<class ConcreteFileSystemTestFixture>
class FsppNodeTest_Stat_SymlinkOnly: public FileSystemTest<ConcreteFileSystemTestFixture>, public FsppNodeTestHelper {}; 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) { TYPED_TEST_P(FsppNodeTest_Stat_SymlinkOnly, SymlinkIsSymlink) {
this->CreateSymlink("/mysymlink"); 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 Nlink
); );
REGISTER_TYPED_TEST_CASE_P(FsppNodeTest_Stat_FileOnly, REGISTER_TYPED_TEST_SUITE_P(FsppNodeTest_Stat_FileOnly,
CreatedFileIsEmpty, CreatedFileIsEmpty,
FileIsFile FileIsFile
); );
REGISTER_TYPED_TEST_CASE_P(FsppNodeTest_Stat_DirOnly, REGISTER_TYPED_TEST_SUITE_P(FsppNodeTest_Stat_DirOnly,
DirIsDir DirIsDir
); );
REGISTER_TYPED_TEST_CASE_P(FsppNodeTest_Stat_SymlinkOnly, REGISTER_TYPED_TEST_SUITE_P(FsppNodeTest_Stat_SymlinkOnly,
SymlinkIsSymlink SymlinkIsSymlink
); );

View File

@ -349,7 +349,7 @@ public:
} }
}; };
REGISTER_NODE_TEST_CASE(FsppNodeTest_Timestamps, REGISTER_NODE_TEST_SUITE(FsppNodeTest_Timestamps,
Create, Create,
Stat, Stat,
Chmod, Chmod,

View File

@ -29,7 +29,7 @@ public:
} }
}; };
TYPED_TEST_CASE_P(FsppOpenFileTest); TYPED_TEST_SUITE_P(FsppOpenFileTest);
TYPED_TEST_P(FsppOpenFileTest, CreatedFileIsEmpty) { TYPED_TEST_P(FsppOpenFileTest, CreatedFileIsEmpty) {
auto file = this->CreateFile("/myfile"); 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, CreatedFileIsEmpty,
FileIsFile FileIsFile
); );

View File

@ -19,7 +19,7 @@ public:
return openFile; return openFile;
} }
}; };
TYPED_TEST_CASE_P(FsppOpenFileTest_Timestamps); TYPED_TEST_SUITE_P(FsppOpenFileTest_Timestamps);
TYPED_TEST_P(FsppOpenFileTest_Timestamps, stat) { TYPED_TEST_P(FsppOpenFileTest_Timestamps, stat) {
auto openFile = this->CreateAndOpenFile("/mynode"); 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}); 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, stat,
truncate_empty_to_empty, truncate_empty_to_empty,
truncate_empty_to_nonempty, truncate_empty_to_nonempty,

View File

@ -11,7 +11,7 @@ class FsppSymlinkTest: public FileSystemTest<ConcreteFileSystemTestFixture> {
public: public:
}; };
TYPED_TEST_CASE_P(FsppSymlinkTest); TYPED_TEST_SUITE_P(FsppSymlinkTest);
TYPED_TEST_P(FsppSymlinkTest, Create_AbsolutePath) { TYPED_TEST_P(FsppSymlinkTest, Create_AbsolutePath) {
this->CreateSymlink("/mysymlink", "/my/symlink/target"); 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")); EXPECT_EQ(boost::none, this->device->LoadSymlink("/mytestdir/mysymlink"));
} }
REGISTER_TYPED_TEST_CASE_P(FsppSymlinkTest, REGISTER_TYPED_TEST_SUITE_P(FsppSymlinkTest,
Create_AbsolutePath, Create_AbsolutePath,
Create_RelativePath, Create_RelativePath,
Read_AbsolutePath, Read_AbsolutePath,

View File

@ -8,7 +8,7 @@ template<class ConcreteFileSystemTestFixture>
class FsppSymlinkTest_Timestamps: public TimestampTestUtils<ConcreteFileSystemTestFixture> { class FsppSymlinkTest_Timestamps: public TimestampTestUtils<ConcreteFileSystemTestFixture> {
public: public:
}; };
TYPED_TEST_CASE_P(FsppSymlinkTest_Timestamps); TYPED_TEST_SUITE_P(FsppSymlinkTest_Timestamps);
TYPED_TEST_P(FsppSymlinkTest_Timestamps, target) { TYPED_TEST_P(FsppSymlinkTest_Timestamps, target) {
auto symlink = this->CreateSymlink("/mysymlink"); 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}); 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 target
); );

View File

@ -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. * 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. * 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 * 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). * It will then automatically create a test case for each node type (file, directory, symlink).
* See FsppNodeTest_Rename for an example. * See FsppNodeTest_Rename for an example.
*/ */
@ -35,16 +35,16 @@ public:
virtual cpputils::unique_ref<fspp::Node> CreateNode(const boost::filesystem::path &path) = 0; 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) { \ TYPED_TEST_P(Class, Name) { \
this->BOOST_PP_CAT(Test_,Name)(); \ this->BOOST_PP_CAT(Test_,Name)(); \
} \ } \
#define _REGISTER_NODE_TEST_CASES_FOR_CLASS(Class, ...) \ #define _REGISTER_NODE_TEST_SUITES_FOR_CLASS(Class, ...) \
BOOST_PP_SEQ_FOR_EACH(_REGISTER_SINGLE_NODE_TEST_CASE, Class, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)); \ BOOST_PP_SEQ_FOR_EACH(_REGISTER_SINGLE_NODE_TEST_SUITE, Class, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)); \
REGISTER_TYPED_TEST_CASE_P(Class, __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> \ template<class ConcreteFileSystemTestFixture> \
class Class##_FileNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \ class Class##_FileNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \
public: \ public: \
@ -53,10 +53,10 @@ public:
return this->Load(path); \ return this->Load(path); \
} \ } \
}; \ }; \
TYPED_TEST_CASE_P(Class##_FileNode); \ TYPED_TEST_SUITE_P(Class##_FileNode); \
_REGISTER_NODE_TEST_CASES_FOR_CLASS(Class##_FileNode, __VA_ARGS__); \ _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> \ template<class ConcreteFileSystemTestFixture> \
class Class##_DirNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \ class Class##_DirNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \
public: \ public: \
@ -65,10 +65,10 @@ public:
return this->Load(path); \ return this->Load(path); \
} \ } \
}; \ }; \
TYPED_TEST_CASE_P(Class##_DirNode); \ TYPED_TEST_SUITE_P(Class##_DirNode); \
_REGISTER_NODE_TEST_CASES_FOR_CLASS(Class##_DirNode, __VA_ARGS__); \ _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> \ template<class ConcreteFileSystemTestFixture> \
class Class##_SymlinkNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \ class Class##_SymlinkNode: public Class<ConcreteFileSystemTestFixture>, public virtual FsppNodeTestHelper { \
public: \ public: \
@ -77,17 +77,17 @@ public:
return this->Load(path); \ return this->Load(path); \
} \ } \
}; \ }; \
TYPED_TEST_CASE_P(Class##_SymlinkNode); \ TYPED_TEST_SUITE_P(Class##_SymlinkNode); \
_REGISTER_NODE_TEST_CASES_FOR_CLASS(Class##_SymlinkNode, __VA_ARGS__); \ _REGISTER_NODE_TEST_SUITES_FOR_CLASS(Class##_SymlinkNode, __VA_ARGS__); \
#define REGISTER_NODE_TEST_CASE(Class, ...) \ #define REGISTER_NODE_TEST_SUITE(Class, ...) \
_REGISTER_FILE_TEST_CASE(Class, __VA_ARGS__); \ _REGISTER_FILE_TEST_SUITE(Class, __VA_ARGS__); \
_REGISTER_DIR_TEST_CASE(Class, __VA_ARGS__); \ _REGISTER_DIR_TEST_SUITE(Class, __VA_ARGS__); \
_REGISTER_SYMLINK_TEST_CASE(Class, __VA_ARGS__); \ _REGISTER_SYMLINK_TEST_SUITE(Class, __VA_ARGS__); \
#define INSTANTIATE_NODE_TEST_CASE(FS_NAME, Class, FIXTURE) \ #define INSTANTIATE_NODE_TEST_SUITE(FS_NAME, Class, FIXTURE) \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, Class##_FileNode, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, Class##_FileNode, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, Class##_DirNode, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, Class##_DirNode, FIXTURE); \
INSTANTIATE_TYPED_TEST_CASE_P(FS_NAME, Class##_SymlinkNode, FIXTURE); \ INSTANTIATE_TYPED_TEST_SUITE_P(FS_NAME, Class##_SymlinkNode, FIXTURE); \
#endif #endif

View File

@ -182,7 +182,7 @@ public:
EXPECT_DATA_READS_AS_OUTSIDE_OF(ZEROES, blob, start, count); 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 //Blob with only one leaf
DataRange{BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf(), 0, BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf()}, // full size leaf, access beginning to end 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 DataRange{BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf(), 100, BlobReadWriteDataTest::LAYOUT.maxBytesPerLeaf()-200}, // full size leaf, access middle to middle

View File

@ -160,7 +160,7 @@ public:
return leaf->blockId(); 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) { TEST_P(DataLeafNodeSizeTest, ResizeNode_ReadSizeImmediately) {
leaf->resize(GetParam()); leaf->resize(GetParam());
@ -305,7 +305,7 @@ public:
EXPECT_DATA_READS_AS_OUTSIDE_OF(ZEROES, leaf, start, count); 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(), 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(), 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 DataRange{DataLeafNodeTest::LAYOUT.maxBytesPerLeaf(), 0, DataLeafNodeTest::LAYOUT.maxBytesPerLeaf()-100}, // full size leaf, access beginning to middle

View File

@ -31,7 +31,7 @@ public:
class DataNodeViewDepthTest: public DataNodeViewTest, public WithParamInterface<uint8_t> { 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) { TEST_P(DataNodeViewDepthTest, DepthIsStored) {
auto block = blockStore->create(Data(BLOCKSIZE_BYTES)); auto block = blockStore->create(Data(BLOCKSIZE_BYTES));
@ -46,7 +46,7 @@ TEST_P(DataNodeViewDepthTest, DepthIsStored) {
class DataNodeViewSizeTest: public DataNodeViewTest, public WithParamInterface<uint32_t> { 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) { TEST_P(DataNodeViewSizeTest, SizeIsStored) {
auto block = blockStore->create(Data(BLOCKSIZE_BYTES)); auto block = blockStore->create(Data(BLOCKSIZE_BYTES));

View File

@ -17,9 +17,9 @@ TEST_F(DataTreeTest_NumStoredBytes, CreatedTreeIsEmpty) {
} }
class DataTreeTest_NumStoredBytes_P: public DataTreeTest_NumStoredBytes, public WithParamInterface<uint32_t> {}; class DataTreeTest_NumStoredBytes_P: public DataTreeTest_NumStoredBytes, public WithParamInterface<uint32_t> {};
INSTANTIATE_TEST_CASE_P(EmptyLastLeaf, DataTreeTest_NumStoredBytes_P, Values(0u)); INSTANTIATE_TEST_SUITE_P(EmptyLastLeaf, DataTreeTest_NumStoredBytes_P, Values(0u));
INSTANTIATE_TEST_CASE_P(HalfFullLastLeaf, DataTreeTest_NumStoredBytes_P, Values(5u, 10u)); INSTANTIATE_TEST_SUITE_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(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) //TODO Test numLeaves() and numNodes() also two configurations with same number of bytes but different number of leaves (last leaf has 0 bytes)

View File

@ -135,7 +135,7 @@ public:
uint32_t traversalBeginIndex; uint32_t traversalBeginIndex;
Data ZEROES; Data ZEROES;
}; };
INSTANTIATE_TEST_CASE_P(DataTreeTest_ResizeByTraversing_P, DataTreeTest_ResizeByTraversing_P, INSTANTIATE_TEST_SUITE_P(DataTreeTest_ResizeByTraversing_P, DataTreeTest_ResizeByTraversing_P,
Combine( Combine(
//Tree we're starting with //Tree we're starting with
Values<function<unique_ref<DataTree>(DataTreeTest_ResizeByTraversing*, uint32_t)>>( Values<function<unique_ref<DataTree>(DataTreeTest_ResizeByTraversing*, uint32_t)>>(

View File

@ -124,7 +124,7 @@ public:
uint64_t newSize; uint64_t newSize;
Data ZEROES; Data ZEROES;
}; };
INSTANTIATE_TEST_CASE_P(DataTreeTest_ResizeNumBytes_P, DataTreeTest_ResizeNumBytes_P, INSTANTIATE_TEST_SUITE_P(DataTreeTest_ResizeNumBytes_P, DataTreeTest_ResizeNumBytes_P,
Combine( Combine(
//Tree we're starting with //Tree we're starting with
Values<function<unique_ref<DataTree>(DataTreeTest_ResizeNumBytes*, uint32_t)>>( Values<function<unique_ref<DataTree>(DataTreeTest_ResizeNumBytes*, uint32_t)>>(

View File

@ -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 { 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);

View File

@ -23,5 +23,5 @@ public:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(Compressing_Gzip, BlockStoreTest, CompressingBlockStoreTestFixture<Gzip>); INSTANTIATE_TYPED_TEST_SUITE_P(Compressing_Gzip, BlockStoreTest, CompressingBlockStoreTestFixture<Gzip>);
INSTANTIATE_TYPED_TEST_CASE_P(Compressing_RunLengthEncoding, BlockStoreTest, CompressingBlockStoreTestFixture<RunLengthEncoding>); INSTANTIATE_TYPED_TEST_SUITE_P(Compressing_RunLengthEncoding, BlockStoreTest, CompressingBlockStoreTestFixture<RunLengthEncoding>);

View File

@ -17,7 +17,7 @@ public:
} }
}; };
TYPED_TEST_CASE_P(CompressorTest); TYPED_TEST_SUITE_P(CompressorTest);
TYPED_TEST_P(CompressorTest, Empty) { TYPED_TEST_P(CompressorTest, Empty) {
Data empty(0); Data empty(0);
@ -77,7 +77,7 @@ TYPED_TEST_P(CompressorTest, LargeRunsAndArbitrary) {
this->EXPECT_COMPRESS_AND_DECOMPRESS_IS_IDENTITY(data); this->EXPECT_COMPRESS_AND_DECOMPRESS_IS_IDENTITY(data);
} }
REGISTER_TYPED_TEST_CASE_P(CompressorTest, REGISTER_TYPED_TEST_SUITE_P(CompressorTest,
Empty, Empty,
ArbitraryData, ArbitraryData,
Zeroes, Zeroes,
@ -88,5 +88,5 @@ REGISTER_TYPED_TEST_CASE_P(CompressorTest,
LargeRunsAndArbitrary LargeRunsAndArbitrary
); );
INSTANTIATE_TYPED_TEST_CASE_P(Gzip, CompressorTest, Gzip); INSTANTIATE_TYPED_TEST_SUITE_P(Gzip, CompressorTest, Gzip);
INSTANTIATE_TYPED_TEST_CASE_P(RunLengthEncoding, CompressorTest, RunLengthEncoding); INSTANTIATE_TYPED_TEST_SUITE_P(RunLengthEncoding, CompressorTest, RunLengthEncoding);

View File

@ -41,9 +41,9 @@ private:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_FakeCipher, BlockStoreTest, EncryptedBlockStoreTestFixture<FakeAuthenticatedCipher>); INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_FakeCipher, BlockStoreTest, EncryptedBlockStoreTestFixture<FakeAuthenticatedCipher>);
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_AES256_GCM, BlockStoreTest, EncryptedBlockStoreTestFixture<AES256_GCM>); INSTANTIATE_TYPED_TEST_SUITE_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_AES256_CFB, BlockStoreTest, EncryptedBlockStoreTestFixture<AES256_CFB>);
template<class Cipher> template<class Cipher>
class EncryptedBlockStore2TestFixture: public BlockStore2TestFixture { class EncryptedBlockStore2TestFixture: public BlockStore2TestFixture {
@ -60,6 +60,6 @@ private:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_FakeCipher, BlockStore2Test, EncryptedBlockStore2TestFixture<FakeAuthenticatedCipher>); INSTANTIATE_TYPED_TEST_SUITE_P(Encrypted_FakeCipher, BlockStore2Test, EncryptedBlockStore2TestFixture<FakeAuthenticatedCipher>);
INSTANTIATE_TYPED_TEST_CASE_P(Encrypted_AES256_GCM, BlockStore2Test, EncryptedBlockStore2TestFixture<AES256_GCM>); INSTANTIATE_TYPED_TEST_SUITE_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_AES256_CFB, BlockStore2Test, EncryptedBlockStore2TestFixture<AES256_CFB>);

View File

@ -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 { class InMemoryBlockStore2TestFixture: public BlockStore2TestFixture {
public: public:
@ -32,4 +32,4 @@ public:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(InMemory, BlockStore2Test, InMemoryBlockStore2TestFixture); INSTANTIATE_TYPED_TEST_SUITE_P(InMemory, BlockStore2Test, InMemoryBlockStore2TestFixture);

View File

@ -35,10 +35,10 @@ using IntegrityBlockStoreTestFixture_singleclient = IntegrityBlockStoreTestFixtu
using IntegrityBlockStoreTestFixture_multiclient_allowIntegrityViolations = IntegrityBlockStoreTestFixture<true, false>; using IntegrityBlockStoreTestFixture_multiclient_allowIntegrityViolations = IntegrityBlockStoreTestFixture<true, false>;
using IntegrityBlockStoreTestFixture_singleclient_allowIntegrityViolations = IntegrityBlockStoreTestFixture<true, true>; using IntegrityBlockStoreTestFixture_singleclient_allowIntegrityViolations = IntegrityBlockStoreTestFixture<true, true>;
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient); INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_multiclient, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient);
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_singleclient, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient); INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_singleclient, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient);
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient_allowIntegrityViolations, BlockStoreTest, IntegrityBlockStoreTestFixture_multiclient_allowIntegrityViolations); INSTANTIATE_TYPED_TEST_SUITE_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_singleclient_allowIntegrityViolations, BlockStoreTest, IntegrityBlockStoreTestFixture_singleclient_allowIntegrityViolations);
template<bool AllowIntegrityViolations, bool MissingBlockIsIntegrityViolation> template<bool AllowIntegrityViolations, bool MissingBlockIsIntegrityViolation>
class IntegrityBlockStore2TestFixture: public BlockStore2TestFixture { class IntegrityBlockStore2TestFixture: public BlockStore2TestFixture {
@ -56,7 +56,7 @@ using IntegrityBlockStore2TestFixture_singleclient = IntegrityBlockStore2TestFix
using IntegrityBlockStore2TestFixture_multiclient_allowIntegrityViolations = IntegrityBlockStore2TestFixture<true, false>; using IntegrityBlockStore2TestFixture_multiclient_allowIntegrityViolations = IntegrityBlockStore2TestFixture<true, false>;
using IntegrityBlockStore2TestFixture_singleclient_allowIntegrityViolations = IntegrityBlockStore2TestFixture<true, true>; using IntegrityBlockStore2TestFixture_singleclient_allowIntegrityViolations = IntegrityBlockStore2TestFixture<true, true>;
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient); INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_multiclient, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient);
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_singleclient, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient); INSTANTIATE_TYPED_TEST_SUITE_P(Integrity_singleclient, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient);
INSTANTIATE_TYPED_TEST_CASE_P(Integrity_multiclient_allowIntegrityViolations, BlockStore2Test, IntegrityBlockStore2TestFixture_multiclient_allowIntegrityViolations); INSTANTIATE_TYPED_TEST_SUITE_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_singleclient_allowIntegrityViolations, BlockStore2Test, IntegrityBlockStore2TestFixture_singleclient_allowIntegrityViolations);

View File

@ -22,4 +22,4 @@ public:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(LowToHighLevel, BlockStoreTest, LowToHighLevelBlockStoreTestFixture); INSTANTIATE_TYPED_TEST_SUITE_P(LowToHighLevel, BlockStoreTest, LowToHighLevelBlockStoreTestFixture);

View File

@ -17,4 +17,4 @@ public:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(Mock, BlockStoreTest, MockBlockStoreTestFixture); INSTANTIATE_TYPED_TEST_SUITE_P(Mock, BlockStoreTest, MockBlockStoreTestFixture);

View File

@ -29,7 +29,7 @@ private:
TempDir tempdir; TempDir tempdir;
}; };
INSTANTIATE_TYPED_TEST_CASE_P(OnDisk, BlockStoreTest, OnDiskBlockStoreTestFixture); INSTANTIATE_TYPED_TEST_SUITE_P(OnDisk, BlockStoreTest, OnDiskBlockStoreTestFixture);
class OnDiskBlockStore2TestFixture: public BlockStore2TestFixture { class OnDiskBlockStore2TestFixture: public BlockStore2TestFixture {
public: public:
@ -42,4 +42,4 @@ private:
TempDir tempdir; TempDir tempdir;
}; };
INSTANTIATE_TYPED_TEST_CASE_P(OnDisk, BlockStore2Test, OnDiskBlockStore2TestFixture); INSTANTIATE_TYPED_TEST_SUITE_P(OnDisk, BlockStore2Test, OnDiskBlockStore2TestFixture);

View File

@ -60,7 +60,7 @@ public:
ZEROES.FillWithZeroes(); 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) { TEST_P(OnDiskBlockCreateSizeTest, OnDiskSizeIsCorrect) {
Data fileContent = Data::LoadFromFile(file.path()).value(); Data fileContent = Data::LoadFromFile(file.path()).value();

View File

@ -63,7 +63,7 @@ public:
EXPECT_EQ(randomData, fileContentWithoutHeader); 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. // This test is also tested by OnDiskBlockStoreTest, but there the block is created using the BlockStore interface.
// Here, we create it using OnDiskBlock::CreateOnDisk() // Here, we create it using OnDiskBlock::CreateOnDisk()

View File

@ -56,7 +56,7 @@ public:
EXPECT_EQ(0, std::memcmp(expected.data(), actual.data(), expected.size())); 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) { TEST_P(OnDiskBlockLoadTest, LoadsCorrectSize) {
CreateBlockWithSize(GetParam()); CreateBlockWithSize(GetParam());

View File

@ -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 //TODO Add specific tests ensuring that loading the same block twice doesn't load it twice from the underlying blockstore

View File

@ -16,4 +16,4 @@ public:
} }
}; };
INSTANTIATE_TYPED_TEST_CASE_P(TestFake, BlockStoreTest, FakeBlockStoreTestFixture); INSTANTIATE_TYPED_TEST_SUITE_P(TestFake, BlockStoreTest, FakeBlockStoreTestFixture);

View File

@ -53,7 +53,7 @@ public:
} }
}; };
TYPED_TEST_CASE_P(BlockStore2Test); TYPED_TEST_SUITE_P(BlockStore2Test);
TYPED_TEST_P(BlockStore2Test, givenNonEmptyBlockStore_whenCallingTryCreateOnExistingBlock_thenFails) { TYPED_TEST_P(BlockStore2Test, givenNonEmptyBlockStore_whenCallingTryCreateOnExistingBlock_thenFails) {
blockstore::BlockId blockId = this->blockStore->create(cpputils::Data(1024)); 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))); EXPECT_FALSE(blockStore->tryCreate(blockId, cpputils::Data(0)));
}*/ }*/
REGISTER_TYPED_TEST_CASE_P(BlockStore2Test, REGISTER_TYPED_TEST_SUITE_P(BlockStore2Test,
givenNonEmptyBlockStore_whenCallingTryCreateOnExistingBlock_thenFails, givenNonEmptyBlockStore_whenCallingTryCreateOnExistingBlock_thenFails,
givenEmptyBlockStore_whenCallingTryCreateOnNonExistingBlock_thenSucceeds, givenEmptyBlockStore_whenCallingTryCreateOnNonExistingBlock_thenSucceeds,
givenNonEmptyBlockStore_whenCallingTryCreateOnNonExistingBlock_thenSucceeds, givenNonEmptyBlockStore_whenCallingTryCreateOnNonExistingBlock_thenSucceeds,

View File

@ -70,7 +70,7 @@ public:
} }
}; };
TYPED_TEST_CASE_P(BlockStoreTest); TYPED_TEST_SUITE_P(BlockStoreTest);
TYPED_TEST_P(BlockStoreTest, TwoCreatedBlocksHaveDifferentBlockIds) { TYPED_TEST_P(BlockStoreTest, TwoCreatedBlocksHaveDifferentBlockIds) {
auto blockStore = this->fixture.createBlockStore(); auto blockStore = this->fixture.createBlockStore();
@ -341,7 +341,7 @@ TYPED_TEST_P(BlockStoreTest, TryCreateTwoBlocksWithSameBlockIdAndBothNullSize) {
#include "BlockStoreTest_Data.h" #include "BlockStoreTest_Data.h"
REGISTER_TYPED_TEST_CASE_P(BlockStoreTest, REGISTER_TYPED_TEST_SUITE_P(BlockStoreTest,
CreatedBlockHasCorrectSize, CreatedBlockHasCorrectSize,
LoadingUnchangedBlockHasCorrectSize, LoadingUnchangedBlockHasCorrectSize,
CreatedBlockData, CreatedBlockData,

View File

@ -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}}; 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); this->ExpectDoesntDecrypt(tooSmallCiphertext);
} }
REGISTER_TYPED_TEST_CASE_P(CipherTest, REGISTER_TYPED_TEST_SUITE_P(CipherTest,
Size, Size,
EncryptThenDecrypt_Zeroes, EncryptThenDecrypt_Zeroes,
EncryptThenDecrypt_Data, EncryptThenDecrypt_Data,
@ -144,7 +144,7 @@ public:
Data plaintext2 = CipherTest<Cipher>::CreateData(100 * 1024); Data plaintext2 = CipherTest<Cipher>::CreateData(100 * 1024);
}; };
TYPED_TEST_CASE_P(AuthenticatedCipherTest); TYPED_TEST_SUITE_P(AuthenticatedCipherTest);
TYPED_TEST_P(AuthenticatedCipherTest, ModifyFirstByte_Zeroes_Size1) { TYPED_TEST_P(AuthenticatedCipherTest, ModifyFirstByte_Zeroes_Size1) {
Data ciphertext = this->Encrypt(this->zeroes1); Data ciphertext = this->Encrypt(this->zeroes1);
@ -210,7 +210,7 @@ TYPED_TEST_P(AuthenticatedCipherTest, TryDecryptRandomData) {
this->ExpectDoesntDecrypt(this->plaintext2); this->ExpectDoesntDecrypt(this->plaintext2);
} }
REGISTER_TYPED_TEST_CASE_P(AuthenticatedCipherTest, REGISTER_TYPED_TEST_SUITE_P(AuthenticatedCipherTest,
ModifyFirstByte_Zeroes_Size1, ModifyFirstByte_Zeroes_Size1,
ModifyFirstByte_Zeroes, ModifyFirstByte_Zeroes,
ModifyFirstByte_Data_Size1, ModifyFirstByte_Data_Size1,
@ -224,43 +224,43 @@ REGISTER_TYPED_TEST_CASE_P(AuthenticatedCipherTest,
); );
INSTANTIATE_TYPED_TEST_CASE_P(Fake, CipherTest, FakeAuthenticatedCipher); INSTANTIATE_TYPED_TEST_SUITE_P(Fake, CipherTest, FakeAuthenticatedCipher);
INSTANTIATE_TYPED_TEST_CASE_P(Fake, AuthenticatedCipherTest, 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_SUITE_P(AES256_CFB, CipherTest, AES256_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(AES256_GCM, CipherTest, AES256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(AES256_GCM, CipherTest, AES256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(AES256_GCM, AuthenticatedCipherTest, AES256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(AES256_GCM, AuthenticatedCipherTest, AES256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(AES128_CFB, CipherTest, AES128_CFB); //CFB mode is not authenticated INSTANTIATE_TYPED_TEST_SUITE_P(AES128_CFB, CipherTest, AES128_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(AES128_GCM, CipherTest, AES128_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(AES128_GCM, CipherTest, AES128_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(AES128_GCM, AuthenticatedCipherTest, 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_SUITE_P(Twofish256_CFB, CipherTest, Twofish256_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Twofish256_GCM, CipherTest, Twofish256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Twofish256_GCM, CipherTest, Twofish256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Twofish256_GCM, AuthenticatedCipherTest, Twofish256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Twofish256_GCM, AuthenticatedCipherTest, Twofish256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Twofish128_CFB, CipherTest, Twofish128_CFB); //CFB mode is not authenticated INSTANTIATE_TYPED_TEST_SUITE_P(Twofish128_CFB, CipherTest, Twofish128_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Twofish128_GCM, CipherTest, Twofish128_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Twofish128_GCM, CipherTest, Twofish128_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Twofish128_GCM, AuthenticatedCipherTest, 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_SUITE_P(Serpent256_CFB, CipherTest, Serpent256_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Serpent256_GCM, CipherTest, Serpent256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Serpent256_GCM, CipherTest, Serpent256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Serpent256_GCM, AuthenticatedCipherTest, Serpent256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Serpent256_GCM, AuthenticatedCipherTest, Serpent256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Serpent128_CFB, CipherTest, Serpent128_CFB); //CFB mode is not authenticated INSTANTIATE_TYPED_TEST_SUITE_P(Serpent128_CFB, CipherTest, Serpent128_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Serpent128_GCM, CipherTest, Serpent128_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Serpent128_GCM, CipherTest, Serpent128_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Serpent128_GCM, AuthenticatedCipherTest, 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_SUITE_P(Cast256_CFB, CipherTest, Cast256_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Cast256_GCM, CipherTest, Cast256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Cast256_GCM, CipherTest, Cast256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Cast256_GCM, AuthenticatedCipherTest, 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_SUITE_P(Mars448_CFB, CipherTest, Mars448_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Mars448_GCM, CipherTest, Mars448_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Mars448_GCM, CipherTest, Mars448_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Mars448_GCM, AuthenticatedCipherTest, Mars448_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Mars448_GCM, AuthenticatedCipherTest, Mars448_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Mars256_CFB, CipherTest, Mars256_CFB); //CFB mode is not authenticated INSTANTIATE_TYPED_TEST_SUITE_P(Mars256_CFB, CipherTest, Mars256_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Mars256_GCM, CipherTest, Mars256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Mars256_GCM, CipherTest, Mars256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Mars256_GCM, AuthenticatedCipherTest, Mars256_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Mars256_GCM, AuthenticatedCipherTest, Mars256_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Mars128_CFB, CipherTest, Mars128_CFB); //CFB mode is not authenticated INSTANTIATE_TYPED_TEST_SUITE_P(Mars128_CFB, CipherTest, Mars128_CFB); //CFB mode is not authenticated
INSTANTIATE_TYPED_TEST_CASE_P(Mars128_GCM, CipherTest, Mars128_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Mars128_GCM, CipherTest, Mars128_GCM);
INSTANTIATE_TYPED_TEST_CASE_P(Mars128_GCM, AuthenticatedCipherTest, Mars128_GCM); INSTANTIATE_TYPED_TEST_SUITE_P(Mars128_GCM, AuthenticatedCipherTest, Mars128_GCM);
// Test cipher names // Test cipher names

View File

@ -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) { TEST_P(DataTestWithSizeParam, ZeroInitializedDataIsDifferentToRandomData) {
if (GetParam() != 0) { if (GetParam() != 0) {
@ -215,7 +215,7 @@ TEST_F(DataTest, LoadingNonexistingFile) {
} }
class DataTestWithStringParam: public DataTest, public WithParamInterface<string> {}; 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) { TEST_P(DataTestWithStringParam, FromAndToString) {
Data data = Data::FromString(GetParam()); Data data = Data::FromString(GetParam());

View File

@ -66,7 +66,7 @@ TEST_F(FixedSizeDataTest, NotEqualsTrue) {
} }
class FixedSizeDataTestWithStringParam: public FixedSizeDataTest, public WithParamInterface<string> {}; 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) { TEST_P(FixedSizeDataTestWithStringParam, FromAndToString) {
FixedSizeData<SIZE> data = FixedSizeData<SIZE>::FromString(GetParam()); FixedSizeData<SIZE> data = FixedSizeData<SIZE>::FromString(GetParam());
@ -86,7 +86,7 @@ public:
}; };
const Data FixedSizeDataTestWithBinaryParam::VALUE1(DataFixture::generate(SIZE, 3)); const Data FixedSizeDataTestWithBinaryParam::VALUE1(DataFixture::generate(SIZE, 3));
const Data FixedSizeDataTestWithBinaryParam::VALUE2(DataFixture::generate(SIZE, 4)); 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) { TEST_P(FixedSizeDataTestWithBinaryParam, FromBinary) {
FixedSizeData<SIZE> data = FixedSizeData<SIZE>::FromBinary(GetParam()->data()); 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>> {}; 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) { TEST_P(FixedSizeDataTestWithParam, CopyConstructor) {
FixedSizeData<SIZE> copy(GetParam()); FixedSizeData<SIZE> copy(GetParam());

View File

@ -88,7 +88,7 @@ namespace IdValueTypeTest_constexpr_test_extras {
template<class Type> class IdValueTypeTest : public testing::Test { template<class Type> class IdValueTypeTest : public testing::Test {
}; };
using IdValueTypeTest_types = testing::Types<MyIdValueType, MyOrderedIdValueType, MyQuantityValueType, MyFlagsValueType>; 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) { TYPED_TEST(IdValueTypeTest, Equality) {
@ -207,7 +207,7 @@ namespace OrderedIdValueTypeTest_constexpr_test_extras {
template<class Type> class OrderedIdValueTypeTest : public testing::Test {}; template<class Type> class OrderedIdValueTypeTest : public testing::Test {};
using OrderedIdValueTypeTest_types = testing::Types<MyOrderedIdValueType, MyQuantityValueType>; using OrderedIdValueTypeTest_types = testing::Types<MyOrderedIdValueType, MyQuantityValueType>;
TYPED_TEST_CASE(OrderedIdValueTypeTest, OrderedIdValueTypeTest_types); TYPED_TEST_SUITE(OrderedIdValueTypeTest, OrderedIdValueTypeTest_types);
TYPED_TEST(OrderedIdValueTypeTest, LessThan) { TYPED_TEST(OrderedIdValueTypeTest, LessThan) {
TypeParam a(3); TypeParam a(3);
@ -310,7 +310,7 @@ namespace QuantityValueTypeTest_constexpr_test {
template<class Type> class QuantityValueTypeTest : public testing::Test {}; template<class Type> class QuantityValueTypeTest : public testing::Test {};
using QuantityValueTypeTest_types = testing::Types<MyQuantityValueType>; using QuantityValueTypeTest_types = testing::Types<MyQuantityValueType>;
TYPED_TEST_CASE(QuantityValueTypeTest, QuantityValueTypeTest_types); TYPED_TEST_SUITE(QuantityValueTypeTest, QuantityValueTypeTest_types);
TYPED_TEST(QuantityValueTypeTest, PreIncrement) { TYPED_TEST(QuantityValueTypeTest, PreIncrement) {
TypeParam a(3); TypeParam a(3);
@ -437,7 +437,7 @@ namespace FlagsValueTypeTest_constexpr_test {
template<class Type> class FlagsValueTypeTest : public testing::Test {}; template<class Type> class FlagsValueTypeTest : public testing::Test {};
using FlagsValueType_types = testing::Types<MyFlagsValueType>; using FlagsValueType_types = testing::Types<MyFlagsValueType>;
TYPED_TEST_CASE(FlagsValueTypeTest, FlagsValueType_types); TYPED_TEST_SUITE(FlagsValueTypeTest, FlagsValueType_types);
TYPED_TEST(FlagsValueTypeTest, Invert) { TYPED_TEST(FlagsValueTypeTest, Invert) {
TypeParam a(3); TypeParam a(3);

View File

@ -72,14 +72,14 @@ public:
} }
}; };
INSTANTIATE_TEST_CASE_P(DefaultParams, CliTest_WrongEnvironment, Values(TestConfig({false, false, false}))); INSTANTIATE_TEST_SUITE_P(DefaultParams, CliTest_WrongEnvironment, Values(TestConfig({false, false, false})));
INSTANTIATE_TEST_CASE_P(ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, false}))); INSTANTIATE_TEST_SUITE_P(ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, false})));
INSTANTIATE_TEST_CASE_P(LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({false, true, false}))); INSTANTIATE_TEST_SUITE_P(LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({false, true, false})));
INSTANTIATE_TEST_CASE_P(ExternalConfigfile_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({true, true, false}))); INSTANTIATE_TEST_SUITE_P(ExternalConfigfile_LogIsNotStderr, CliTest_WrongEnvironment, Values(TestConfig({true, true, false})));
INSTANTIATE_TEST_CASE_P(RunningInForeground, CliTest_WrongEnvironment, Values(TestConfig({false, false, true}))); INSTANTIATE_TEST_SUITE_P(RunningInForeground, CliTest_WrongEnvironment, Values(TestConfig({false, false, true})));
INSTANTIATE_TEST_CASE_P(RunningInForeground_ExternalConfigfile, CliTest_WrongEnvironment, Values(TestConfig({true, false, true}))); INSTANTIATE_TEST_SUITE_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_SUITE_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(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. //Counter-Test. Test that it doesn't fail if we call it without an error condition.
TEST_P(CliTest_WrongEnvironment, NoErrorCondition) { TEST_P(CliTest_WrongEnvironment, NoErrorCondition) {

View File

@ -111,4 +111,4 @@ TEST_P(CryConfigConsoleTest_Cipher_Choose, ChoosesCipherCorrectly) {
EXPECT_EQ(cipherName, chosenCipher); 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()));

View File

@ -13,7 +13,7 @@ using namespace fspp::fuse;
class FuseAccessErrorTest: public FuseAccessTest, public WithParamInterface<int> { 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) { TEST_P(FuseAccessErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -7,7 +7,7 @@ using ::testing::Values;
class FuseAccessModeTest: public FuseAccessTest, public WithParamInterface<int> { 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) { TEST_P(FuseAccessModeTest, AccessFile) {

View File

@ -71,7 +71,7 @@ public:
fd->release(); // don't try closing it again 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 //TODO Figure out what's wrong and enable this test
//Disabled, because it is flaky. libfuse seems to not send the release() event sometimes. //Disabled, because it is flaky. libfuse seems to not send the release() event sometimes.

View File

@ -13,7 +13,7 @@ using namespace fspp::fuse;
class FuseCreateAndOpenErrorTest: public FuseCreateAndOpenTest, public WithParamInterface<int> { 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) { TEST_F(FuseCreateAndOpenErrorTest, ReturnNoError) {
ReturnDoesntExistOnLstat(FILENAME); ReturnDoesntExistOnLstat(FILENAME);

View File

@ -30,7 +30,7 @@ private:
EXPECT_EQ(1, retval) << "Reading file failed"; 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) { TEST_P(FuseCreateAndOpenFileDescriptorTest, TestReturnedFileDescriptor) {
ReturnDoesntExistOnLstat(FILENAME); ReturnDoesntExistOnLstat(FILENAME);

View File

@ -5,7 +5,7 @@ using ::testing::Values;
class FuseCreateAndOpenFlagsTest: public FuseCreateAndOpenTest, public WithParamInterface<mode_t> { 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? //TODO Disabled because it doesn't seem to work. Fuse doesn't seem to pass flags to create(). Why?
/*TEST_P(FuseCreateAndOpenFlagsTest, testFlags) { /*TEST_P(FuseCreateAndOpenFlagsTest, testFlags) {

View File

@ -10,7 +10,7 @@ using namespace fspp::fuse;
class FuseFdatasyncErrorTest: public FuseFdatasyncTest, public WithParamInterface<int> { 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) { TEST_P(FuseFdatasyncErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -11,7 +11,7 @@ using namespace fspp::fuse;
class FuseFdatasyncFileDescriptorTest: public FuseFdatasyncTest, public WithParamInterface<int> { 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) { TEST_P(FuseFdatasyncFileDescriptorTest, FileDescriptorIsCorrect) {

View File

@ -14,7 +14,7 @@ using fspp::fuse::FuseErrnoException;
class FuseFlushErrorTest: public FuseFlushTest, public WithParamInterface<int> { class FuseFlushErrorTest: public FuseFlushTest, public WithParamInterface<int> {
}; };
INSTANTIATE_TEST_CASE_P(FuseFlushErrorTest, FuseFlushErrorTest, Values( INSTANTIATE_TEST_SUITE_P(FuseFlushErrorTest, FuseFlushErrorTest, Values(
EBADF, EBADF,
#if defined(__GLIBC__) || defined(__APPLE__) #if defined(__GLIBC__) || defined(__APPLE__)
// musl has different handling for EINTR, see https://ewontfix.com/4/ // musl has different handling for EINTR, see https://ewontfix.com/4/

View File

@ -22,7 +22,7 @@ using std::string;
class FuseFlushFileDescriptorTest: public FuseFlushTest, public WithParamInterface<int> { 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) { TEST_P(FuseFlushFileDescriptorTest, FlushOnCloseFile) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -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); 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) { TEST_P(FuseFstatErrorTest, ReturnedErrorCodeIsCorrect) {
ReturnDoesntExistOnLstat(FILENAME); ReturnDoesntExistOnLstat(FILENAME);

View File

@ -21,7 +21,7 @@ public:
CreateFile(fs.get(), filename); 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) { TEST_P(FuseFstatParameterTest, FileDescriptorIsCorrect) {

View File

@ -10,7 +10,7 @@ using namespace fspp::fuse;
class FuseFsyncErrorTest: public FuseFsyncTest, public WithParamInterface<int> { 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) { TEST_P(FuseFsyncErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -11,7 +11,7 @@ using namespace fspp::fuse;
class FuseFsyncFileDescriptorTest: public FuseFsyncTest, public WithParamInterface<int> { 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) { TEST_P(FuseFsyncFileDescriptorTest, FileDescriptorIsCorrect) {

View File

@ -11,7 +11,7 @@ using namespace fspp::fuse;
class FuseFTruncateErrorTest: public FuseFTruncateTest, public WithParamInterface<int> { 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) { TEST_P(FuseFTruncateErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -12,7 +12,7 @@ using namespace fspp::fuse;
class FuseFTruncateFileDescriptorTest: public FuseFTruncateTest, public WithParamInterface<int> { 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) { TEST_P(FuseFTruncateFileDescriptorTest, FileDescriptorIsCorrect) {

View File

@ -7,7 +7,7 @@ using ::testing::Values;
class FuseFTruncateSizeTest: public FuseFTruncateTest, public WithParamInterface<fspp::num_bytes_t> { 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(0),
fspp::num_bytes_t(1), fspp::num_bytes_t(1),
fspp::num_bytes_t(10), fspp::num_bytes_t(10),

View File

@ -14,7 +14,7 @@ using fspp::fuse::FuseErrnoException;
class FuseLstatErrorTest: public FuseLstatTest, public WithParamInterface<int> { class FuseLstatErrorTest: public FuseLstatTest, public WithParamInterface<int> {
public: 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) { TEST_F(FuseLstatErrorTest, ReturnNoError) {
EXPECT_CALL(*fsimpl, lstat(StrEq(FILENAME), _)).Times(AtLeast(1)).WillRepeatedly(ReturnIsFile); EXPECT_CALL(*fsimpl, lstat(StrEq(FILENAME), _)).Times(AtLeast(1)).WillRepeatedly(ReturnIsFile);

View File

@ -11,7 +11,7 @@ private:
stat->st_atim.tv_nsec = 0; stat->st_atim.tv_nsec = 0;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnATimeTest, FuseLstatReturnATimeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnATimeTest, FuseLstatReturnATimeTest, Values(
0, 0,
100, 100,
1416496809, // current timestamp as of writing the test 1416496809, // current timestamp as of writing the test

View File

@ -11,7 +11,7 @@ private:
stat->st_ctim.tv_nsec = 0; stat->st_ctim.tv_nsec = 0;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnCtimeTest, FuseLstatReturnCtimeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnCtimeTest, FuseLstatReturnCtimeTest, Values(
0, 0,
100, 100,
1416496809, // current timestamp as of writing the test 1416496809, // current timestamp as of writing the test

View File

@ -9,7 +9,7 @@ private:
stat->st_gid = value; stat->st_gid = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnGidTest, FuseLstatReturnGidTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnGidTest, FuseLstatReturnGidTest, Values(
0, 0,
10 10
)); ));

View File

@ -11,7 +11,7 @@ public:
}); });
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnModeTest, FuseLstatReturnModeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnModeTest, FuseLstatReturnModeTest, Values(
S_IFREG, S_IFREG,
S_IFDIR, S_IFDIR,
S_IFREG | S_IRUSR | S_IWGRP | S_IXOTH, // a file with some access bits set S_IFREG | S_IRUSR | S_IWGRP | S_IXOTH, // a file with some access bits set

View File

@ -11,7 +11,7 @@ private:
stat->st_mtim.tv_nsec = 0; stat->st_mtim.tv_nsec = 0;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnMtimeTest, FuseLstatReturnMtimeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnMtimeTest, FuseLstatReturnMtimeTest, Values(
0, 0,
100, 100,
1416496809, // current timestamp as of writing the test 1416496809, // current timestamp as of writing the test

View File

@ -9,7 +9,7 @@ private:
stat->st_nlink = value; stat->st_nlink = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnNlinkTest, FuseLstatReturnNlinkTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnNlinkTest, FuseLstatReturnNlinkTest, Values(
1, 1,
2, 2,
5, 5,

View File

@ -9,7 +9,7 @@ private:
stat->st_size = value.value(); 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(0),
fspp::num_bytes_t(1), fspp::num_bytes_t(1),
fspp::num_bytes_t(4096), fspp::num_bytes_t(4096),

View File

@ -9,7 +9,7 @@ private:
stat->st_uid = value; stat->st_uid = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseLstatReturnUidTest, FuseLstatReturnUidTest, Values( INSTANTIATE_TEST_SUITE_P(FuseLstatReturnUidTest, FuseLstatReturnUidTest, Values(
0, 0,
10 10
)); ));

View File

@ -12,7 +12,7 @@ using namespace fspp::fuse;
class FuseMkdirErrorTest: public FuseMkdirTest, public WithParamInterface<int> { 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) { TEST_F(FuseMkdirErrorTest, NoError) {
ReturnDoesntExistOnLstat(DIRNAME); ReturnDoesntExistOnLstat(DIRNAME);

View File

@ -7,7 +7,7 @@ using ::testing::Values;
class FuseMkdirModeTest: public FuseMkdirTest, public WithParamInterface<mode_t> { 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) { TEST_P(FuseMkdirModeTest, Mkdir) {

View File

@ -13,7 +13,7 @@ using namespace fspp::fuse;
class FuseOpenErrorTest: public FuseOpenTest, public WithParamInterface<int> { 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) { TEST_F(FuseOpenErrorTest, ReturnNoError) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -30,7 +30,7 @@ private:
EXPECT_EQ(1, retval) << "Reading file failed"; 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) { TEST_P(FuseOpenFileDescriptorTest, TestReturnedFileDescriptor) {
ReturnIsFileOnLstatWithSize(FILENAME, fspp::num_bytes_t(1)); ReturnIsFileOnLstatWithSize(FILENAME, fspp::num_bytes_t(1));

View File

@ -7,7 +7,7 @@ using ::testing::Return;
class FuseOpenFlagsTest: public FuseOpenTest, public WithParamInterface<int> { 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) { TEST_P(FuseOpenFlagsTest, testFlags) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -23,7 +23,7 @@ public:
OnOpenReturnFileDescriptor(FILENAME, 0); 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) { TEST_P(FuseReadErrorTest, ReturnErrorOnFirstReadCall) {

View File

@ -11,7 +11,7 @@ using namespace fspp::fuse;
class FuseReadFileDescriptorTest: public FuseReadTest, public WithParamInterface<int> { 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) { TEST_P(FuseReadFileDescriptorTest, FileDescriptorIsCorrect) {

View File

@ -61,7 +61,7 @@ public:
return testFile->read(buf, count, offset); 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(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)),
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))

View File

@ -13,7 +13,7 @@ using namespace fspp::fuse;
class FuseReadDirErrorTest: public FuseReadDirTest, public WithParamInterface<int> { 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? //TODO On ENOENT, libfuse doesn't return the ENOENT error, but returns a success response with an empty directory. Why?

View File

@ -33,7 +33,7 @@ public:
EXPECT_EQ(direntries, *returned_dir_entries); EXPECT_EQ(direntries, *returned_dir_entries);
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseReadDirReturnTest, FuseReadDirReturnTest, Values( INSTANTIATE_TEST_SUITE_P(FuseReadDirReturnTest, FuseReadDirReturnTest, Values(
vector<string>({}), vector<string>({}),
vector<string>({"oneentry"}), vector<string>({"oneentry"}),
vector<string>({"twoentries_1", "twoentries_2"}), vector<string>({"twoentries_1", "twoentries_2"}),

View File

@ -10,7 +10,7 @@ using namespace fspp::fuse;
class FuseRenameErrorTest: public FuseRenameTest, public WithParamInterface<int> { 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) { TEST_P(FuseRenameErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME1); ReturnIsFileOnLstat(FILENAME1);

View File

@ -10,7 +10,7 @@ using namespace fspp::fuse;
class FuseRmdirErrorTest: public FuseRmdirTest, public WithParamInterface<int> { class FuseRmdirErrorTest: public FuseRmdirTest, public WithParamInterface<int> {
}; };
INSTANTIATE_TEST_CASE_P(FuseRmdirErrorTest, FuseRmdirErrorTest, Values(EACCES, EBUSY, EFAULT, EINVAL, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, ENOTEMPTY, EPERM, EROFS)); INSTANTIATE_TEST_SUITE_P(FuseRmdirErrorTest, FuseRmdirErrorTest, Values(EACCES, EBUSY, EFAULT, EINVAL, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, ENOTEMPTY, EPERM, EROFS));
TEST_P(FuseRmdirErrorTest, ReturnedErrorIsCorrect) { TEST_P(FuseRmdirErrorTest, ReturnedErrorIsCorrect) {
ReturnIsDirOnLstat(DIRNAME); ReturnIsDirOnLstat(DIRNAME);

View File

@ -13,7 +13,7 @@ using fspp::fuse::FuseErrnoException;
class FuseStatfsErrorTest: public FuseStatfsTest, public WithParamInterface<int> { class FuseStatfsErrorTest: public FuseStatfsTest, public WithParamInterface<int> {
public: public:
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsErrorTest, FuseStatfsErrorTest, Values(EACCES, EBADF, EFAULT, EINTR, EIO, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOSYS, ENOTDIR, EOVERFLOW)); INSTANTIATE_TEST_SUITE_P(FuseStatfsErrorTest, FuseStatfsErrorTest, Values(EACCES, EBADF, EFAULT, EINTR, EIO, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOSYS, ENOTDIR, EOVERFLOW));
TEST_F(FuseStatfsErrorTest, ReturnNoError) { TEST_F(FuseStatfsErrorTest, ReturnNoError) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -9,7 +9,7 @@ private:
stat->f_bavail = value; stat->f_bavail = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnBavailTest, FuseStatfsReturnBavailTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnBavailTest, FuseStatfsReturnBavailTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -9,7 +9,7 @@ private:
stat->f_bfree = value; stat->f_bfree = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnBfreeTest, FuseStatfsReturnBfreeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnBfreeTest, FuseStatfsReturnBfreeTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -9,7 +9,7 @@ private:
stat->f_blocks = value; stat->f_blocks = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnBlocksTest, FuseStatfsReturnBlocksTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnBlocksTest, FuseStatfsReturnBlocksTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -9,7 +9,7 @@ private:
stat->f_bsize = value; stat->f_bsize = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnBsizeTest, FuseStatfsReturnBsizeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnBsizeTest, FuseStatfsReturnBsizeTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -9,7 +9,7 @@ private:
stat->f_ffree = value; stat->f_ffree = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnFfreeTest, FuseStatfsReturnFfreeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnFfreeTest, FuseStatfsReturnFfreeTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -9,7 +9,7 @@ private:
stat->f_files = value; stat->f_files = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnFilesTest, FuseStatfsReturnFilesTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnFilesTest, FuseStatfsReturnFilesTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -9,7 +9,7 @@ private:
stat->f_namemax = value; stat->f_namemax = value;
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseStatfsReturnNamemaxTest, FuseStatfsReturnNamemaxTest, Values( INSTANTIATE_TEST_SUITE_P(FuseStatfsReturnNamemaxTest, FuseStatfsReturnNamemaxTest, Values(
0, 0,
10, 10,
256, 256,

View File

@ -11,7 +11,7 @@ using namespace fspp::fuse;
class FuseTruncateErrorTest: public FuseTruncateTest, public WithParamInterface<int> { class FuseTruncateErrorTest: public FuseTruncateTest, public WithParamInterface<int> {
}; };
INSTANTIATE_TEST_CASE_P(FuseTruncateErrorTest, FuseTruncateErrorTest, Values(EACCES, EFAULT, EFBIG, EINTR, EINVAL, EIO, EISDIR, ELOOP, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS, ETXTBSY)); INSTANTIATE_TEST_SUITE_P(FuseTruncateErrorTest, FuseTruncateErrorTest, Values(EACCES, EFAULT, EFBIG, EINTR, EINVAL, EIO, EISDIR, ELOOP, ENAMETOOLONG, ENOENT, ENOTDIR, EPERM, EROFS, ETXTBSY));
TEST_P(FuseTruncateErrorTest, ReturnedErrorIsCorrect) { TEST_P(FuseTruncateErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -8,7 +8,7 @@ using ::testing::Eq;
class FuseTruncateSizeTest: public FuseTruncateTest, public WithParamInterface<fspp::num_bytes_t> { class FuseTruncateSizeTest: public FuseTruncateTest, public WithParamInterface<fspp::num_bytes_t> {
}; };
INSTANTIATE_TEST_CASE_P(FuseTruncateSizeTest, FuseTruncateSizeTest, Values( INSTANTIATE_TEST_SUITE_P(FuseTruncateSizeTest, FuseTruncateSizeTest, Values(
fspp::num_bytes_t(0), fspp::num_bytes_t(0),
fspp::num_bytes_t(1), fspp::num_bytes_t(1),
fspp::num_bytes_t(10), fspp::num_bytes_t(10),

View File

@ -10,7 +10,7 @@ using namespace fspp::fuse;
class FuseUnlinkErrorTest: public FuseUnlinkTest, public WithParamInterface<int> { class FuseUnlinkErrorTest: public FuseUnlinkTest, public WithParamInterface<int> {
}; };
INSTANTIATE_TEST_CASE_P(FuseUnlinkErrorTest, FuseUnlinkErrorTest, Values(EACCES, EBUSY, EFAULT, EIO, EISDIR, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EPERM, EROFS, EINVAL)); INSTANTIATE_TEST_SUITE_P(FuseUnlinkErrorTest, FuseUnlinkErrorTest, Values(EACCES, EBUSY, EFAULT, EIO, EISDIR, ELOOP, ENAMETOOLONG, ENOENT, ENOMEM, ENOTDIR, EPERM, EROFS, EINVAL));
TEST_P(FuseUnlinkErrorTest, ReturnedErrorIsCorrect) { TEST_P(FuseUnlinkErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -11,7 +11,7 @@ using namespace fspp::fuse;
class FuseUtimensErrorTest: public FuseUtimensTest, public WithParamInterface<int> { class FuseUtimensErrorTest: public FuseUtimensTest, public WithParamInterface<int> {
}; };
INSTANTIATE_TEST_CASE_P(FuseUtimensErrorTest, FuseUtimensErrorTest, Values(EACCES, ENOENT, EPERM, EROFS)); INSTANTIATE_TEST_SUITE_P(FuseUtimensErrorTest, FuseUtimensErrorTest, Values(EACCES, ENOENT, EPERM, EROFS));
TEST_P(FuseUtimensErrorTest, ReturnedErrorIsCorrect) { TEST_P(FuseUtimensErrorTest, ReturnedErrorIsCorrect) {
ReturnIsFileOnLstat(FILENAME); ReturnIsFileOnLstat(FILENAME);

View File

@ -17,7 +17,7 @@ const std::array<timespec, 2> TIMEVAL7 = {FuseUtimensTest::makeTimespec(0,0), Fu
const std::array<timespec, 2> TIMEVAL8 = {FuseUtimensTest::makeTimespec(0,0), FuseUtimensTest::makeTimespec(1000,1000)}; const std::array<timespec, 2> TIMEVAL8 = {FuseUtimensTest::makeTimespec(0,0), FuseUtimensTest::makeTimespec(1000,1000)};
const std::array<timespec, 2> TIMEVAL9 = {FuseUtimensTest::makeTimespec(1417196126,123000), FuseUtimensTest::makeTimespec(1417109713,321000)}; // current timestamp and the day before as of writing this test case const std::array<timespec, 2> TIMEVAL9 = {FuseUtimensTest::makeTimespec(1417196126,123000), FuseUtimensTest::makeTimespec(1417109713,321000)}; // current timestamp and the day before as of writing this test case
const std::array<timespec, 2> TIMEVAL10 = {FuseUtimensTest::makeTimespec(UINT64_C(1024)*1024*1024*1024,999000), FuseUtimensTest::makeTimespec(UINT64_C(2*1024)*1024*1024*1024,321000)}; // needs 64bit for timestamp representation const std::array<timespec, 2> TIMEVAL10 = {FuseUtimensTest::makeTimespec(UINT64_C(1024)*1024*1024*1024,999000), FuseUtimensTest::makeTimespec(UINT64_C(2*1024)*1024*1024*1024,321000)}; // needs 64bit for timestamp representation
INSTANTIATE_TEST_CASE_P(FuseUtimensTimeParameterTest, FuseUtimensTimeParameterTest, INSTANTIATE_TEST_SUITE_P(FuseUtimensTimeParameterTest, FuseUtimensTimeParameterTest,
Values(TIMEVAL1, TIMEVAL2, TIMEVAL3, TIMEVAL4, TIMEVAL5, TIMEVAL6, TIMEVAL7, TIMEVAL8, TIMEVAL9, TIMEVAL10)); Values(TIMEVAL1, TIMEVAL2, TIMEVAL3, TIMEVAL4, TIMEVAL5, TIMEVAL6, TIMEVAL7, TIMEVAL8, TIMEVAL9, TIMEVAL10));

View File

@ -58,7 +58,7 @@ public:
testFile->write(buf, count, offset); testFile->write(buf, count, offset);
}); });
}; };
INSTANTIATE_TEST_CASE_P(FuseWriteDataTest, FuseWriteDataTest, Combine( INSTANTIATE_TEST_SUITE_P(FuseWriteDataTest, FuseWriteDataTest, 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(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)),
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))

View File

@ -23,7 +23,7 @@ public:
OnOpenReturnFileDescriptor(FILENAME, 0); OnOpenReturnFileDescriptor(FILENAME, 0);
} }
}; };
INSTANTIATE_TEST_CASE_P(FuseWriteErrorTest, FuseWriteErrorTest, Values(EAGAIN, EBADF, EDESTADDRREQ, EDQUOT, EFAULT, EFBIG, EINTR, EINVAL, EIO, ENOSPC, EPIPE, EOVERFLOW, ESPIPE, ENXIO)); INSTANTIATE_TEST_SUITE_P(FuseWriteErrorTest, FuseWriteErrorTest, Values(EAGAIN, EBADF, EDESTADDRREQ, EDQUOT, EFAULT, EFBIG, EINTR, EINVAL, EIO, ENOSPC, EPIPE, EOVERFLOW, ESPIPE, ENXIO));
TEST_P(FuseWriteErrorTest, ReturnErrorOnFirstWriteCall) { TEST_P(FuseWriteErrorTest, ReturnErrorOnFirstWriteCall) {

View File

@ -12,7 +12,7 @@ using namespace fspp::fuse;
class FuseWriteFileDescriptorTest: public FuseWriteTest, public WithParamInterface<int> { class FuseWriteFileDescriptorTest: public FuseWriteTest, public WithParamInterface<int> {
}; };
INSTANTIATE_TEST_CASE_P(FuseWriteFileDescriptorTest, FuseWriteFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024)); INSTANTIATE_TEST_SUITE_P(FuseWriteFileDescriptorTest, FuseWriteFileDescriptorTest, Values(0,1,10,1000,1024*1024*1024));
TEST_P(FuseWriteFileDescriptorTest, FileDescriptorIsCorrect) { TEST_P(FuseWriteFileDescriptorTest, FileDescriptorIsCorrect) {