Improving test coverage [adding FsReq::readdirSync]
Signed-off-by: Stefano Fiorentino <stefano.fiore84@gmail.com>
This commit is contained in:
parent
216f5f4da1
commit
6fd64f93a0
@ -802,3 +802,19 @@ TEST(FsReq, ReadDir) {
|
||||
ASSERT_TRUE(checkFsReadDirEvent);
|
||||
ASSERT_TRUE(checkFsOpenDirEvent);
|
||||
}
|
||||
|
||||
TEST(FsReq, ReadDirSync) {
|
||||
const std::string dir_name = std::string{TARGET_FS_REQ_DIR};
|
||||
|
||||
auto loop = uvw::Loop::getDefault();
|
||||
auto fsReq = loop->resource<uvw::FsReq>();
|
||||
|
||||
ASSERT_TRUE(fsReq->opendirSync(dir_name));
|
||||
auto res = fsReq->readdirSync();
|
||||
while(res.first) {
|
||||
res = fsReq->readdirSync();
|
||||
}
|
||||
ASSERT_TRUE(fsReq->closedirSync());
|
||||
|
||||
loop->run();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user