24#include "testing/testing.h"
45 testing::Test::SetUpTestSuite();
56 testing::Test::TearDownTestSuite();
61 const std::string test_files_dir = blender::tests::flags_test_asset_dir();
62 if (test_files_dir.empty()) {
105 const std::vector<AssetCatalogPath> &expected_paths);
113 const std::vector<AssetCatalogPath> &expected_paths);
121 const std::vector<AssetCatalogPath> &expected_paths);
137 const std::string expected_path_str = expected_path.
str();
138 const size_t expected_parent_count = std::count(
148 ASSERT_LT(
i, expected_paths.size())
149 <<
"More catalogs in tree than expected; did not expect " << actual_item.
catalog_path();
160 ASSERT_LT(
i, expected_paths.size())
161 <<
"More catalogs in tree root than expected; did not expect "
173 ASSERT_LT(
i, expected_paths.size())
174 <<
"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