本文整理汇总了C++中Folder::Path方法的典型用法代码示例。如果您正苦于以下问题:C++ Folder::Path方法的具体用法?C++ Folder::Path怎么用?C++ Folder::Path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Folder
的用法示例。
在下文中一共展示了Folder::Path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compared_path
TEST(D_FileSystemTest, Folders_Create_3)
{
ASSERT_TRUE(DatabasePrepare());
FoldersNames_vt foldsNames;
const unsigned char foldsInPack = 5;
CreateFoldNames(foldsInPack, foldsNames);
ASSERT_FALSE(foldsNames.empty());
FolderGuard root;
ASSERT_NO_THROW(root = cont->GetRoot());
for (int i = 1; i < foldsInPack; ++i)
{
FolderGuard new_root;
ASSERT_NO_THROW(new_root = root->CreateFolder(foldsNames[i]));
for (int j = 0; j < foldsInPack; ++j)
{
ElementGuard ce;
EXPECT_NO_THROW(new_root->CreateChild(foldsNames[j], ElementTypeFolder));
EXPECT_NO_THROW(ce = new_root->GetChild(foldsNames[j]));
EXPECT_EQ(foldsNames[j], ce->Name());
EXPECT_EQ(ElementTypeFolder, ce->Type());
Folder* cf = ce->AsFolder();
ASSERT_NE(cf, nullptr);
EXPECT_THROW(new_root->CreateChild(foldsNames[j], ElementTypeFolder), ContainerException);
EXPECT_THROW(new_root->CreateChild(foldsNames[j], ElementTypeFile), ContainerException);
std::string compared_path(utils::SlashedPath(new_root->Path()) + foldsNames[j]);
EXPECT_EQ(compared_path, cf->Path());
}
}
}