[Bf-blender-cvs] [b524153d61e] master: Cleanup: use C comments for plain text
Campbell Barton
noreply at git.blender.org
Tue Sep 28 23:39:05 CEST 2021
Commit: b524153d61e20419bf7ebe2df099c237c2b4427c
Author: Campbell Barton
Date: Wed Sep 29 07:29:17 2021 +1000
Branches: master
https://developer.blender.org/rBb524153d61e20419bf7ebe2df099c237c2b4427c
Cleanup: use C comments for plain text
===================================================================
M source/blender/blenkernel/intern/asset_catalog_test.cc
M source/blender/blenkernel/intern/nla.c
M source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M source/blender/depsgraph/intern/node/deg_node_component.cc
===================================================================
diff --git a/source/blender/blenkernel/intern/asset_catalog_test.cc b/source/blender/blenkernel/intern/asset_catalog_test.cc
index 9ac2c9f5512..5b94f021797 100644
--- a/source/blender/blenkernel/intern/asset_catalog_test.cc
+++ b/source/blender/blenkernel/intern/asset_catalog_test.cc
@@ -175,28 +175,28 @@ TEST_F(AssetCatalogTest, load_single_file)
AssetCatalogService service(asset_library_root_);
service.load_from_disk(asset_library_root_ + "/" + "blender_assets.cats.txt");
- // Test getting a non-existent catalog ID.
+ /* Test getting a non-existent catalog ID. */
EXPECT_EQ(nullptr, service.find_catalog(BLI_uuid_generate_random()));
- // Test getting an invalid catalog (without path definition).
+ /* Test getting an invalid catalog (without path definition). */
AssetCatalog *cat_without_path = service.find_catalog(UUID_ID_WITHOUT_PATH);
ASSERT_EQ(nullptr, cat_without_path);
- // Test getting a regular catalog.
+ /* Test getting a regular catalog. */
AssetCatalog *poses_ellie = service.find_catalog(UUID_POSES_ELLIE);
ASSERT_NE(nullptr, poses_ellie);
EXPECT_EQ(UUID_POSES_ELLIE, poses_ellie->catalog_id);
EXPECT_EQ("character/Ellie/poselib", poses_ellie->path);
EXPECT_EQ("POSES_ELLIE", poses_ellie->simple_name);
- // Test whitespace stripping and support in the path.
+ /* Test white-space stripping and support in the path. */
AssetCatalog *poses_whitespace = service.find_catalog(UUID_POSES_ELLIE_WHITESPACE);
ASSERT_NE(nullptr, poses_whitespace);
EXPECT_EQ(UUID_POSES_ELLIE_WHITESPACE, poses_whitespace->catalog_id);
EXPECT_EQ("character/Ellie/poselib/white space", poses_whitespace->path);
EXPECT_EQ("POSES_ELLIE WHITESPACE", poses_whitespace->simple_name);
- // Test getting a UTF-8 catalog ID.
+ /* Test getting a UTF-8 catalog ID. */
AssetCatalog *poses_ruzena = service.find_catalog(UUID_POSES_RUZENA);
ASSERT_NE(nullptr, poses_ruzena);
EXPECT_EQ(UUID_POSES_RUZENA, poses_ruzena->catalog_id);
@@ -302,9 +302,9 @@ TEST_F(AssetCatalogTest, load_single_file_into_tree)
{"character/Ružena/poselib", 2},
{"character/Ružena/poselib/face", 3},
{"character/Ružena/poselib/hand", 3},
- {"path", 0}, // Implicit.
- {"path/without", 1}, // Implicit.
- {"path/without/simplename", 2}, // From CDF.
+ {"path", 0}, /* Implicit. */
+ {"path/without", 1}, /* Implicit. */
+ {"path/without/simplename", 2}, /* From CDF. */
};
AssetCatalogTree *tree = service.get_catalog_tree();
@@ -385,7 +385,7 @@ TEST_F(AssetCatalogTest, write_single_file)
AssetCatalogService loaded_service(save_to_path);
loaded_service.load_from_disk();
- // Test that the expected catalogs are there.
+ /* Test that the expected catalogs are there. */
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_WHITESPACE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_TRAILING_SLASH));
@@ -393,10 +393,10 @@ TEST_F(AssetCatalogTest, write_single_file)
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_RUZENA_HAND));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_RUZENA_FACE));
- // Test that the invalid catalog definition wasn't copied.
+ /* Test that the invalid catalog definition wasn't copied. */
EXPECT_EQ(nullptr, loaded_service.find_catalog(UUID_ID_WITHOUT_PATH));
- // TODO(@sybren): test ordering of catalogs in the file.
+ /* TODO(@sybren): test ordering of catalogs in the file. */
}
TEST_F(AssetCatalogTest, no_writing_empty_files)
@@ -413,7 +413,7 @@ TEST_F(AssetCatalogTest, no_writing_empty_files)
/* Already loaded a CDF, saving to some unrelated directory. */
TEST_F(AssetCatalogTest, on_blendfile_save__with_existing_cdf)
{
- const CatalogFilePath top_level_dir = create_temp_path(); // Has trailing slash.
+ const CatalogFilePath top_level_dir = create_temp_path(); /* Has trailing slash. */
/* Create a copy of the CDF in SVN, so we can safely write to it. */
const CatalogFilePath original_cdf_file = asset_library_root_ + "/blender_assets.cats.txt";
@@ -450,7 +450,7 @@ TEST_F(AssetCatalogTest, on_blendfile_save__with_existing_cdf)
/* Create some catalogs in memory, save to directory that doesn't contain anything else. */
TEST_F(AssetCatalogTest, on_blendfile_save__from_memory_into_empty_directory)
{
- const CatalogFilePath target_dir = create_temp_path(); // Has trailing slash.
+ const CatalogFilePath target_dir = create_temp_path(); /* Has trailing slash. */
TestableAssetCatalogService service;
const AssetCatalog *cat = service.create_catalog("some/catalog/path");
@@ -477,7 +477,7 @@ TEST_F(AssetCatalogTest, on_blendfile_save__from_memory_into_empty_directory)
/* Create some catalogs in memory, save to directory that contains a default CDF. */
TEST_F(AssetCatalogTest, on_blendfile_save__from_memory_into_existing_cdf_and_merge)
{
- const CatalogFilePath target_dir = create_temp_path(); // Has trailing slash.
+ const CatalogFilePath target_dir = create_temp_path(); /* Has trailing slash. */
const CatalogFilePath original_cdf_file = asset_library_root_ + "/blender_assets.cats.txt";
const CatalogFilePath writable_cdf_file = target_dir +
AssetCatalogService::DEFAULT_CATALOG_FILENAME;
@@ -512,7 +512,7 @@ TEST_F(AssetCatalogTest, on_blendfile_save__from_memory_into_existing_cdf_and_me
/* Create some catalogs in memory, save to subdirectory of a registered asset library. */
TEST_F(AssetCatalogTest, on_blendfile_save__from_memory_into_existing_asset_lib)
{
- const CatalogFilePath target_dir = create_temp_path(); // Has trailing slash.
+ const CatalogFilePath target_dir = create_temp_path(); /* Has trailing slash. */
const CatalogFilePath original_cdf_file = asset_library_root_ + "/blender_assets.cats.txt";
const CatalogFilePath registered_asset_lib = target_dir + "my_asset_library/";
CatalogFilePath writable_cdf_file = registered_asset_lib +
@@ -584,7 +584,7 @@ TEST_F(AssetCatalogTest, create_first_catalog_from_scratch)
AssetCatalogService loaded_service(temp_lib_root);
loaded_service.load_from_disk();
- // Test that the expected catalog is there.
+ /* Test that the expected catalog is there. */
AssetCatalog *written_cat = loaded_service.find_catalog(cat->catalog_id);
ASSERT_NE(nullptr, written_cat);
EXPECT_EQ(written_cat->catalog_id, cat->catalog_id);
@@ -677,7 +677,7 @@ TEST_F(AssetCatalogTest, delete_catalog_leaf)
{"character/Ružena", 1},
{"character/Ružena/poselib", 2},
{"character/Ružena/poselib/face", 3},
- // {"character/Ružena/poselib/hand", 3}, // This is the deleted one.
+ // {"character/Ružena/poselib/hand", 3}, /* This is the deleted one. */
{"path", 0},
{"path/without", 1},
{"path/without/simplename", 2},
@@ -702,7 +702,7 @@ TEST_F(AssetCatalogTest, delete_catalog_write_to_disk)
AssetCatalogService loaded_service(save_to_path);
loaded_service.load_from_disk();
- // Test that the expected catalogs are there, except the deleted one.
+ /* Test that the expected catalogs are there, except the deleted one. */
EXPECT_EQ(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_WHITESPACE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_TRAILING_SLASH));
@@ -750,29 +750,30 @@ TEST_F(AssetCatalogTest, merge_catalog_files)
const CatalogFilePath temp_cdf_file = cdf_dir + "blender_assets.cats.txt";
ASSERT_EQ(0, BLI_copy(original_cdf_file.c_str(), temp_cdf_file.c_str()));
- // Load the unmodified, original CDF.
+ /* Load the unmodified, original CDF. */
TestableAssetCatalogService service(asset_library_root_);
service.load_from_disk(cdf_dir);
- // Copy a modified file, to mimic a situation where someone changed the CDF after we loaded it.
+ /* Copy a modified file, to mimic a situation where someone changed the
+ * CDF after we loaded it. */
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.
+ /* Overwrite the modified file. This should merge the on-disk file with our catalogs. */
service.write_to_disk_on_blendfile_save(cdf_dir + "phony.blend");
AssetCatalogService loaded_service(cdf_dir);
loaded_service.load_from_disk();
- // Test that the expected catalogs are there.
+ /* Test that the expected catalogs are there. */
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_WHITESPACE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_TRAILING_SLASH));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_RUZENA));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_RUZENA_HAND));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_RUZENA_FACE));
- EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_AGENT_47)); // New in the modified file.
+ EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_AGENT_47)); /* New in the modified file. */
- // When there are overlaps, the in-memory (i.e. last-saved) paths should win.
+ /* When there are overlaps, the in-memory (i.e. last-saved) paths should win. */
const AssetCatalog *ruzena_face = loaded_service.find_catalog(UUID_POSES_RUZENA_FACE);
EXPECT_EQ("character/Ružena/poselib/face", ruzena_face->path);
}
@@ -796,8 +797,8 @@ TEST_F(AssetCatalogTest, backups)
AssetCatalogService loaded_service;
loaded_service.load_from_disk(backup_path);
- // Test that the expected catalogs are there, including the deleted one.
- // This is the backup, after all.
+ /* Test that the expected catalogs are there, including the deleted one.
+ * This is the backup, after all. */
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_POSES_ELLIE_WHITESPACE));
EXPECT_NE(nullptr, loaded_service.find_catalog(UUID_P
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list