Blender
V3.3
|
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_ |
Definition at line 77 of file asset_catalog_test.cc.
|
inlineprotected |
Definition at line 130 of file asset_catalog_test.cc.
References blender::bke::AssetCatalogTreeItem::catalog_path(), count, blender::bke::AssetCatalogTreeItem::count_parents(), EXPECT_EQ(), blender::bke::AssetCatalogTreeItem::get_name(), blender::bke::AssetCatalogPath::name(), blender::bke::AssetCatalogPath::SEPARATOR, and blender::bke::AssetCatalogPath::str().
Referenced by assert_expected_tree_item_child_items(), assert_expected_tree_items(), and assert_expected_tree_root_items().
|
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().
|
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.
|
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.
|
inlineprotected |
Definition at line 123 of file asset_catalog_test.cc.
References BLI_dir_create_recursive(), and use_temp_path().
Referenced by save_from_memory_into_existing_asset_lib().
|
inlineprotected |
Definition at line 202 of file asset_catalog_test.cc.
References asset_library_root_, BKE_preferences_asset_library_add(), BKE_preferences_asset_library_remove(), BLI_copy(), BLI_dir_create_recursive(), BLI_exists(), BLI_file_size(), BLI_file_touch(), BLI_path_slash_native(), blender::bke::AssetCatalog::catalog_id, blender::bke::AssetCatalogService::create_catalog(), create_temp_path(), blender::bke::AssetCatalogService::DEFAULT_CATALOG_FILENAME, EXPECT_EQ(), blender::bke::AssetCatalogDefinitionFile::file_path, blender::bke::AssetCatalogService::find_catalog(), blender::bke::tests::TestableAssetCatalogService::get_catalog_definition_file(), blender::bke::AssetCatalogService::load_from_disk(), blender::bke::tests::UUID_POSES_ELLIE, and blender::bke::AssetCatalogService::write_to_disk().
|
inlineoverrideprotected |
Definition at line 94 of file asset_catalog_test.cc.
References asset_library_root_, and temp_library_path_.
|
inlinestaticprotected |
Definition at line 82 of file asset_catalog_test.cc.
References CLG_init().
|
inlineoverrideprotected |
Definition at line 105 of file asset_catalog_test.cc.
References BLI_delete(), and temp_library_path_.
|
inlinestaticprotected |
Definition at line 88 of file asset_catalog_test.cc.
References CLG_exit().
|
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().
|
protected |
Definition at line 79 of file asset_catalog_test.cc.
Referenced by save_from_memory_into_existing_asset_lib(), and SetUp().
|
protected |
Definition at line 80 of file asset_catalog_test.cc.
Referenced by SetUp(), TearDown(), and use_temp_path().