Skip to content

Commit 17f89c7

Browse files
committed
fix: Settings are thread local
1 parent dbce599 commit 17f89c7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/builder.test.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ TEST(Builder, SignImageFileWithoutThumbnailAutoGenerationThroughSettings)
103103
auto reader = c2pa::Reader(output_path);
104104
ASSERT_NO_THROW(reader.json());
105105

106-
// reset settings to defaults, because settings are currently global
106+
// reset settings to defaults, because settings are thread-local
107107
c2pa::load_settings("{\"builder\": { \"thumbnail\": {\"enabled\": true}}}", "json");
108108
};
109109

@@ -844,7 +844,7 @@ TEST(Builder, AddIngredientAsResourceToBuilder)
844844
// Use target/tmp like other tests
845845
fs::path temp_dir = current_dir / "../build/ingredient_as_resource_temp_dir";
846846

847-
// Get the needed JSON for the ingredient
847+
// Get the needed JSON for the ingredient from the ingredient file using `read_ingredient_file`
848848
std::string result;
849849
// The data_dir is the location where binary resources will be stored
850850
// eg. thumbnails
@@ -973,7 +973,7 @@ TEST(Builder, AddIngredientWithProvenanceDataToBuilderUsingBasePath)
973973
// Get the needed JSON for the ingredient
974974
std::string result;
975975
// The data_dir is the location where binary resources will be stored
976-
// eg. thumbnails
976+
// eg. thumbnails, but also additional c2pa data
977977
result = c2pa::read_ingredient_file(ingredient_source_path, temp_dir);
978978

979979
// Create the builder using a manifest JSON
@@ -995,7 +995,7 @@ TEST(Builder, AddIngredientWithProvenanceDataToBuilderUsingBasePath)
995995

996996
// a Builder can load resources from a base path
997997
// eg. ingredients from a data directory.
998-
// Here, we can reuse the data directory from the read_ingredient_file call,
998+
// Here, we reuse the data directory from the read_ingredient_file call,
999999
// so the builder properly loads the ingredient data using that directory.
10001000
builder.set_base_path(temp_dir.string());
10011001

0 commit comments

Comments
 (0)