Adapt test cases to new Device::Load() interface
This commit is contained in:
parent
a974f4f5c0
commit
96653315a8
@ -38,23 +38,17 @@ TYPED_TEST_P(FsppDeviceTest, LoadDirFromRootDir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromEmptyRootDir) {
|
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromEmptyRootDir) {
|
||||||
//TODO Change, as soon as it's clear how we want to handle fs errors
|
EXPECT_EQ(boost::none, this->device->Load("/nonexisting"));
|
||||||
EXPECT_ANY_THROW(
|
|
||||||
this->device->Load("/nonexisting")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromRootDir) {
|
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromRootDir) {
|
||||||
this->InitDirStructure();
|
this->InitDirStructure();
|
||||||
//TODO Change, as soon as it's clear how we want to handle fs errors
|
EXPECT_EQ(boost::none, this->device->Load("/nonexisting"));
|
||||||
EXPECT_ANY_THROW(
|
|
||||||
this->device->Load("/nonexisting")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromNonexistingDir) {
|
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromNonexistingDir) {
|
||||||
this->InitDirStructure();
|
this->InitDirStructure();
|
||||||
//TODO Change, as soon as it's clear how we want to handle fs errors
|
//TODO Change as soon as we have a concept of how to handle filesystem errors in the interface
|
||||||
EXPECT_ANY_THROW(
|
EXPECT_ANY_THROW(
|
||||||
this->device->Load("/nonexisting/nonexisting2")
|
this->device->Load("/nonexisting/nonexisting2")
|
||||||
);
|
);
|
||||||
@ -62,18 +56,12 @@ TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromNonexistingDir) {
|
|||||||
|
|
||||||
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromExistingDir) {
|
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromExistingDir) {
|
||||||
this->InitDirStructure();
|
this->InitDirStructure();
|
||||||
//TODO Change, as soon as it's clear how we want to handle fs errors
|
EXPECT_EQ(boost::none, this->device->Load("/mydir/nonexisting"));
|
||||||
EXPECT_ANY_THROW(
|
|
||||||
this->device->Load("/mydir/nonexisting")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromExistingEmptyDir) {
|
TYPED_TEST_P(FsppDeviceTest, LoadNonexistingFromExistingEmptyDir) {
|
||||||
this->InitDirStructure();
|
this->InitDirStructure();
|
||||||
//TODO Change, as soon as it's clear how we want to handle fs errors
|
EXPECT_EQ(boost::none, this->device->Load("/myemptydir/nonexisting"));
|
||||||
EXPECT_ANY_THROW(
|
|
||||||
this->device->Load("/myemptydir/nonexisting")
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TYPED_TEST_P(FsppDeviceTest, LoadFileFromDir_Nesting1) {
|
TYPED_TEST_P(FsppDeviceTest, LoadFileFromDir_Nesting1) {
|
||||||
@ -98,8 +86,6 @@ TYPED_TEST_P(FsppDeviceTest, LoadDirFromDir_Nesting2) {
|
|||||||
|
|
||||||
//TODO Test statfs
|
//TODO Test statfs
|
||||||
|
|
||||||
//TODO Test class for symlink tests (like FsppDirTest, FsppFileTest, ...)
|
|
||||||
|
|
||||||
REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest,
|
REGISTER_TYPED_TEST_CASE_P(FsppDeviceTest,
|
||||||
InitFilesystem,
|
InitFilesystem,
|
||||||
LoadRootDir,
|
LoadRootDir,
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
//Remove this line if you don't want profiling
|
//Remove this line if you don't want profiling
|
||||||
//#define FSPP_PROFILE 1
|
//#define FSPP_PROFILE 1
|
||||||
|
|
||||||
|
//TODO Test
|
||||||
|
|
||||||
namespace fspp {
|
namespace fspp {
|
||||||
class Node;
|
class Node;
|
||||||
class File;
|
class File;
|
||||||
|
Loading…
Reference in New Issue
Block a user