Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-10-12 12:22:48 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-10-12 12:25:24 +0300
commitac657bee0142f96fcd3fa5d56455658834a19b19 (patch)
treec42d64080a0fa651a8f654c3fff78172282fc796 /source/blender/blenkernel/BKE_asset_catalog_path.hh
parent29e5dc1b197908e09d0872267500b79c8f41c317 (diff)
Tests: simplify asset catalog tree testing code
Simplify the testing code that verifies the asset catalog tree. It now prints clearer error messages when things go wrong, and it gets simpler data to test (instead of having to explicitly pass the parent count, it just counts the number of separators in the expected path). No functional changes to Blender.
Diffstat (limited to 'source/blender/blenkernel/BKE_asset_catalog_path.hh')
-rw-r--r--source/blender/blenkernel/BKE_asset_catalog_path.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_asset_catalog_path.hh b/source/blender/blenkernel/BKE_asset_catalog_path.hh
index 328625b1bfa..054b7853140 100644
--- a/source/blender/blenkernel/BKE_asset_catalog_path.hh
+++ b/source/blender/blenkernel/BKE_asset_catalog_path.hh
@@ -76,6 +76,9 @@ class AssetCatalogPath {
const char *c_str() const;
const std::string &str() const;
+ /* The last path component, used as label in the tree view. */
+ StringRefNull name() const;
+
/* In-class operators, because of the implicit `AssetCatalogPath(StringRef)` constructor.
* Otherwise `string == string` could cast both sides to `AssetCatalogPath`. */
bool operator==(const AssetCatalogPath &other_path) const;