Blender  V3.3
Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
blender::bke::tests::AssetCatalogTest Class Reference
Inheritance diagram for blender::bke::tests::AssetCatalogTest:

Protected Member Functions

void SetUp () override
 
void TearDown () override
 
CatalogFilePath use_temp_path ()
 
CatalogFilePath create_temp_path ()
 
void assert_expected_item (const AssetCatalogPath &expected_path, const AssetCatalogTreeItem &actual_item)
 
void assert_expected_tree_items (AssetCatalogTree *tree, const std::vector< AssetCatalogPath > &expected_paths)
 
void assert_expected_tree_root_items (AssetCatalogTree *tree, const std::vector< AssetCatalogPath > &expected_paths)
 
void assert_expected_tree_item_child_items (AssetCatalogTreeItem *parent_item, const std::vector< AssetCatalogPath > &expected_paths)
 
void save_from_memory_into_existing_asset_lib (const bool should_top_level_cdf_exist)
 

Static Protected Member Functions

static void SetUpTestSuite ()
 
static void TearDownTestSuite ()
 

Protected Attributes

CatalogFilePath asset_library_root_
 
CatalogFilePath temp_library_path_
 

Detailed Description

Definition at line 77 of file asset_catalog_test.cc.

Member Function Documentation

◆ assert_expected_item()

void blender::bke::tests::AssetCatalogTest::assert_expected_item ( const AssetCatalogPath expected_path,
const AssetCatalogTreeItem actual_item 
)
inlineprotected

◆ assert_expected_tree_item_child_items()

void blender::bke::tests::AssetCatalogTest::assert_expected_tree_item_child_items ( AssetCatalogTreeItem parent_item,
const std::vector< AssetCatalogPath > &  expected_paths 
)
inlineprotected

Iterate over the child items of parent_item and check if the items map exactly to expected_paths. Similar to assert_expected_tree_items() but calls #AssetCatalogTreeItem::foreach_child() instead of #AssetCatalogTree::foreach_item().

Definition at line 188 of file asset_catalog_test.cc.

References assert_expected_item(), blender::bke::AssetCatalogTreeItem::catalog_path(), and blender::bke::AssetCatalogTreeItem::foreach_child().

◆ assert_expected_tree_items()

void blender::bke::tests::AssetCatalogTest::assert_expected_tree_items ( AssetCatalogTree tree,
const std::vector< AssetCatalogPath > &  expected_paths 
)
inlineprotected

Recursively iterate over all tree items using #AssetCatalogTree::foreach_item() and check if the items map exactly to expected_paths.

Definition at line 153 of file asset_catalog_test.cc.

References assert_expected_item(), blender::bke::AssetCatalogTreeItem::catalog_path(), and tree.

◆ assert_expected_tree_root_items()

void blender::bke::tests::AssetCatalogTest::assert_expected_tree_root_items ( AssetCatalogTree tree,
const std::vector< AssetCatalogPath > &  expected_paths 
)
inlineprotected

Iterate over the root items of tree and check if the items map exactly to expected_paths. Similar to assert_expected_tree_items() but calls #AssetCatalogTree::foreach_root_item() instead of #AssetCatalogTree::foreach_item().

Definition at line 170 of file asset_catalog_test.cc.

References assert_expected_item(), blender::bke::AssetCatalogTreeItem::catalog_path(), and tree.

◆ create_temp_path()

CatalogFilePath blender::bke::tests::AssetCatalogTest::create_temp_path ( )
inlineprotected

◆ save_from_memory_into_existing_asset_lib()

void blender::bke::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib ( const bool  should_top_level_cdf_exist)
inlineprotected

◆ SetUp()

void blender::bke::tests::AssetCatalogTest::SetUp ( )
inlineoverrideprotected

Definition at line 94 of file asset_catalog_test.cc.

References asset_library_root_, and temp_library_path_.

◆ SetUpTestSuite()

static void blender::bke::tests::AssetCatalogTest::SetUpTestSuite ( )
inlinestaticprotected

Definition at line 82 of file asset_catalog_test.cc.

References CLG_init().

◆ TearDown()

void blender::bke::tests::AssetCatalogTest::TearDown ( )
inlineoverrideprotected

Definition at line 105 of file asset_catalog_test.cc.

References BLI_delete(), and temp_library_path_.

◆ TearDownTestSuite()

static void blender::bke::tests::AssetCatalogTest::TearDownTestSuite ( )
inlinestaticprotected

Definition at line 88 of file asset_catalog_test.cc.

References CLG_exit().

◆ use_temp_path()

CatalogFilePath blender::bke::tests::AssetCatalogTest::use_temp_path ( )
inlineprotected

Definition at line 115 of file asset_catalog_test.cc.

References BKE_tempdir_init(), BKE_tempdir_session, and temp_library_path_.

Referenced by create_temp_path().

Member Data Documentation

◆ asset_library_root_

CatalogFilePath blender::bke::tests::AssetCatalogTest::asset_library_root_
protected

Definition at line 79 of file asset_catalog_test.cc.

Referenced by save_from_memory_into_existing_asset_lib(), and SetUp().

◆ temp_library_path_

CatalogFilePath blender::bke::tests::AssetCatalogTest::temp_library_path_
protected

Definition at line 80 of file asset_catalog_test.cc.

Referenced by SetUp(), TearDown(), and use_temp_path().


The documentation for this class was generated from the following file: