23#include "testing/testing.h"
53 const std::string test_files_dir = blender::tests::flags_test_asset_dir();
54 if (test_files_dir.empty()) {
100 const std::vector<AssetCatalogPath> &expected_paths);
108 const std::vector<AssetCatalogPath> &expected_paths);
116 const std::vector<AssetCatalogPath> &expected_paths);
132 const std::string expected_path_str = expected_path.
str();
133 const size_t expected_parent_count = std::count(
139 const AssetCatalogTree &tree,
const std::vector<AssetCatalogPath> &expected_paths)
143 ASSERT_LT(i, expected_paths.size())
144 <<
"More catalogs in tree than expected; did not expect " << actual_item.
catalog_path();
151 const AssetCatalogTree &tree,
const std::vector<AssetCatalogPath> &expected_paths)
155 ASSERT_LT(i, expected_paths.size())
156 <<
"More catalogs in tree root than expected; did not expect "
168 ASSERT_LT(i, expected_paths.size())
169 <<
"More catalogs in tree item than expected; did not expect "
File and directory operations.
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
void foreach_root_item(ItemIterFn callback) const
void foreach_item(ItemIterFn callback) 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()
std::string asset_library_root_
std::string create_temp_path()
std::string temp_library_path_
static void compare_item_with_path(const AssetCatalogPath &expected_path, const AssetCatalogTreeItem &actual_item)
bool BLI_dir_create_recursive(const char *dirname) ATTR_NONNULL()
const char * BKE_tempdir_session() ATTR_WARN_UNUSED_RESULT ATTR_RETURNS_NONNULL
int BLI_delete(const char *path, bool dir, bool recursive) ATTR_NONNULL()
void BKE_main_free(Main *bmain)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
void BKE_tempdir_init(const char *userdir)