summaryrefslogtreecommitdiff
path: root/test/buildtool/execution_api/common/api_test.hpp
diff options
context:
space:
mode:
authorSascha Roloff <sascha.roloff@huawei.com>2022-10-13 11:39:13 +0200
committerSascha Roloff <sascha.roloff@huawei.com>2022-10-14 12:46:42 +0200
commitf7e4ebf0e2913ff1b987e40baab5c0c809e6c0de (patch)
tree09ae121b46743a7eb682d9ba1361a59566c558bc /test/buildtool/execution_api/common/api_test.hpp
parent4d53961509015534fa10a59f4b86a20ae8a66017 (diff)
downloadjustbuild-f7e4ebf0e2913ff1b987e40baab5c0c809e6c0de.tar.gz
Remove default value of ArtifactDigest::Create template parameter
This enforces the explicit specification, which object type, either file or tree, should be used to create an artifact digest. This also avoids subtile errors at locations as in the previous commit, where files as well as trees are supposed to be handled, but digest creation mistakenly defaults to file object type.
Diffstat (limited to 'test/buildtool/execution_api/common/api_test.hpp')
-rw-r--r--test/buildtool/execution_api/common/api_test.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/buildtool/execution_api/common/api_test.hpp b/test/buildtool/execution_api/common/api_test.hpp
index 08aa3bd2..fdc13643 100644
--- a/test/buildtool/execution_api/common/api_test.hpp
+++ b/test/buildtool/execution_api/common/api_test.hpp
@@ -103,7 +103,7 @@ using ExecProps = std::map<std::string, std::string>;
ExecProps const& props,
bool is_hermetic = false) {
std::string test_content("test");
- auto test_digest = ArtifactDigest::Create(test_content);
+ auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
std::string output_path{"output_file"};
@@ -180,7 +180,7 @@ using ExecProps = std::map<std::string, std::string>;
ExecProps const& props,
bool is_hermetic = false) {
std::string test_content("test");
- auto test_digest = ArtifactDigest::Create(test_content);
+ auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
auto input_artifact_opt =
ArtifactFactory::FromDescription(ArtifactFactory::DescribeKnownArtifact(
@@ -264,7 +264,7 @@ using ExecProps = std::map<std::string, std::string>;
ApiFactory const& api_factory,
ExecProps const& props) {
std::string test_content("test");
- auto test_digest = ArtifactDigest::Create(test_content);
+ auto test_digest = ArtifactDigest::Create<ObjectType::File>(test_content);
std::string output_path{"output_file"};