diff options
author | Sascha Roloff <sascha.roloff@huawei.com> | 2022-10-13 11:39:13 +0200 |
---|---|---|
committer | Sascha Roloff <sascha.roloff@huawei.com> | 2022-10-14 12:46:42 +0200 |
commit | f7e4ebf0e2913ff1b987e40baab5c0c809e6c0de (patch) | |
tree | 09ae121b46743a7eb682d9ba1361a59566c558bc /test/buildtool/execution_api/local/local_ac.test.cpp | |
parent | 4d53961509015534fa10a59f4b86a20ae8a66017 (diff) | |
download | justbuild-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/local/local_ac.test.cpp')
-rw-r--r-- | test/buildtool/execution_api/local/local_ac.test.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/buildtool/execution_api/local/local_ac.test.cpp b/test/buildtool/execution_api/local/local_ac.test.cpp index 2e5e1819..eaee5a7c 100644 --- a/test/buildtool/execution_api/local/local_ac.test.cpp +++ b/test/buildtool/execution_api/local/local_ac.test.cpp @@ -30,7 +30,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, LocalCAS cas{}; LocalAC ac{&cas}; - auto action_id = ArtifactDigest::Create("action"); + auto action_id = ArtifactDigest::Create<ObjectType::File>("action"); CHECK(not ac.CachedResult(action_id)); CHECK(RunDummyExecution(&ac, action_id, "result")); @@ -44,8 +44,8 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, LocalCAS cas{}; LocalAC ac{&cas}; - auto action_id1 = ArtifactDigest::Create("action1"); - auto action_id2 = ArtifactDigest::Create("action2"); + auto action_id1 = ArtifactDigest::Create<ObjectType::File>("action1"); + auto action_id2 = ArtifactDigest::Create<ObjectType::File>("action2"); CHECK(not ac.CachedResult(action_id1)); CHECK(not ac.CachedResult(action_id2)); @@ -73,8 +73,8 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, LocalCAS cas{}; LocalAC ac{&cas}; - auto action_id1 = ArtifactDigest::Create("action1"); - auto action_id2 = ArtifactDigest::Create("action2"); + auto action_id1 = ArtifactDigest::Create<ObjectType::File>("action1"); + auto action_id2 = ArtifactDigest::Create<ObjectType::File>("action2"); CHECK(not ac.CachedResult(action_id1)); CHECK(not ac.CachedResult(action_id2)); @@ -102,7 +102,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, LocalCAS cas{}; LocalAC ac{&cas}; - auto action_id = ArtifactDigest::Create("same action"); + auto action_id = ArtifactDigest::Create<ObjectType::File>("same action"); CHECK(not ac.CachedResult(action_id)); std::string result_content1{}; |