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-09-28 18:32:54 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-09-28 18:32:58 +0300
commit34ba6968b2d4b4803652c3c109963a2de4b070ee (patch)
tree26cf05b9a2e829a76567f91a52428dae4870a6ca /source/blender/blenkernel/intern/asset_catalog_test.cc
parentf17ca53cdd2f3e3f4ccfcae404deebb02ead158d (diff)
Cleanup: asset catalog service, remove obsolete `write_to_disk` function
Remove `AssetCatalogService::write_to_disk()` function. It has been superseded by `write_to_disk_on_blendfile_save()`; the handful of test functions that called the old function have been adjusted to use the new one. No functional changes to Blender itself.
Diffstat (limited to 'source/blender/blenkernel/intern/asset_catalog_test.cc')
-rw-r--r--source/blender/blenkernel/intern/asset_catalog_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/asset_catalog_test.cc b/source/blender/blenkernel/intern/asset_catalog_test.cc
index b36c15940b8..a833e7903fa 100644
--- a/source/blender/blenkernel/intern/asset_catalog_test.cc
+++ b/source/blender/blenkernel/intern/asset_catalog_test.cc
@@ -403,7 +403,7 @@ TEST_F(AssetCatalogTest, no_writing_empty_files)
{
const CatalogFilePath temp_lib_root = create_temp_path();
AssetCatalogService service(temp_lib_root);
- service.write_to_disk(temp_lib_root);
+ service.write_to_disk_on_blendfile_save(temp_lib_root + "phony.blend");
const CatalogFilePath default_cdf_path = temp_lib_root +
AssetCatalogService::DEFAULT_CATALOG_FILENAME;
@@ -574,7 +574,7 @@ TEST_F(AssetCatalogTest, create_first_catalog_from_scratch)
EXPECT_FALSE(BLI_exists(temp_lib_root.c_str()));
/* Writing to disk should create the directory + the default file. */
- service.write_to_disk(temp_lib_root);
+ service.write_to_disk_on_blendfile_save(temp_lib_root + "phony.blend");
EXPECT_TRUE(BLI_is_dir(temp_lib_root.c_str()));
const CatalogFilePath definition_file_path = temp_lib_root + "/" +
@@ -625,7 +625,7 @@ TEST_F(AssetCatalogTest, create_catalog_after_loading_file)
<< "expecting newly added catalog to not yet be saved to " << temp_lib_root;
/* Write and reload the catalog file. */
- service.write_to_disk(temp_lib_root);
+ service.write_to_disk_on_blendfile_save(temp_lib_root + "phony.blend");
AssetCatalogService reloaded_service(temp_lib_root);
reloaded_service.load_from_disk();
EXPECT_NE(nullptr, reloaded_service.find_catalog(UUID_POSES_ELLIE))
@@ -758,7 +758,7 @@ TEST_F(AssetCatalogTest, merge_catalog_files)
ASSERT_EQ(0, BLI_copy(modified_cdf_file.c_str(), temp_cdf_file.c_str()));
// Overwrite the modified file. This should merge the on-disk file with our catalogs.
- service.write_to_disk(cdf_dir);
+ service.write_to_disk_on_blendfile_save(cdf_dir + "phony.blend");
AssetCatalogService loaded_service(cdf_dir);
loaded_service.load_from_disk();
@@ -788,7 +788,7 @@ TEST_F(AssetCatalogTest, backups)
AssetCatalogService service(cdf_dir);
service.load_from_disk();
service.delete_catalog(UUID_POSES_ELLIE);
- service.write_to_disk(cdf_dir);
+ service.write_to_disk_on_blendfile_save(cdf_dir + "phony.blend");
const CatalogFilePath backup_path = writable_cdf_file + "~";
ASSERT_TRUE(BLI_is_file(backup_path.c_str()));