23#include "testing/testing.h"
26class AssetCatalogTree;
27class AssetCatalogTreeItem;
28class AssetCatalogPath;
44 testing::Test::SetUpTestSuite();
54 testing::Test::TearDownTestSuite();
59 const std::string test_files_dir = blender::tests::flags_test_asset_dir();
60 if (test_files_dir.empty()) {
103 const std::vector<AssetCatalogPath> &expected_paths);
111 const std::vector<AssetCatalogPath> &expected_paths);
119 const std::vector<AssetCatalogPath> &expected_paths);
135 const std::string expected_path_str = expected_path.
str();
136 const size_t expected_parent_count = std::count(
146 ASSERT_LT(i, expected_paths.size())
147 <<
"More catalogs in tree than expected; did not expect " << actual_item.
catalog_path();
158 ASSERT_LT(i, expected_paths.size())
159 <<
"More catalogs in tree root than expected; did not expect "
171 ASSERT_LT(i, expected_paths.size())
172 <<
"More catalogs in tree item than expected; did not expect "
void BKE_tempdir_init(const char *userdir)
void BKE_callback_global_finalize()
void BKE_callback_global_init()
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
File and directory operations.
bool BLI_dir_create_recursive(const char *dirname) ATTR_NONNULL()
int BLI_delete(const char *path, bool dir, bool recursive) ATTR_NONNULL()
const std::string & str() const
static const char SEPARATOR
StringRefNull name() const
void foreach_child(ItemIterFn callback) const
int count_parents() const
AssetCatalogPath catalog_path() const
StringRefNull get_name() const
static void expect_tree_items(const AssetCatalogTree &tree, const std::vector< AssetCatalogPath > &expected_paths)
static void expect_tree_root_items(const AssetCatalogTree &tree, const std::vector< AssetCatalogPath > &expected_paths)
static void expect_tree_item_child_items(const AssetCatalogTreeItem &parent_item, const std::vector< AssetCatalogPath > &expected_paths)
std::string use_temp_path()
static void SetUpTestSuite()
std::string asset_library_root_
static void TearDownTestSuite()
std::string create_temp_path()
std::string temp_library_path_
static void compare_item_with_path(const AssetCatalogPath &expected_path, const AssetCatalogTreeItem &actual_item)
void * BKE_tempdir_session