summaryrefslogtreecommitdiff
path: root/test/buildtool/file_system/file_root.test.cpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-07-11 13:22:16 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-12 15:43:37 +0200
commit1e1758e8c30d30df0ebeefbada1e5a8f74d8a350 (patch)
treeb5b87ab3d7b61a0dc0e89e14e28af78293c4a423 /test/buildtool/file_system/file_root.test.cpp
parent9362f6c426a6e10d0f77282364a0061ebf192375 (diff)
downloadjustbuild-1e1758e8c30d30df0ebeefbada1e5a8f74d8a350.tar.gz
Use static Create functions to construct ArtifactDescription
...instead of unobvious ctors relying on overload resolution.
Diffstat (limited to 'test/buildtool/file_system/file_root.test.cpp')
-rw-r--r--test/buildtool/file_system/file_root.test.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/test/buildtool/file_system/file_root.test.cpp b/test/buildtool/file_system/file_root.test.cpp
index e5f84cfb..1f7bf927 100644
--- a/test/buildtool/file_system/file_root.test.cpp
+++ b/test/buildtool/file_system/file_root.test.cpp
@@ -367,8 +367,8 @@ TEST_CASE("Creating artifact descriptions", "[file_root]") {
auto desc = root.ToArtifactDescription("baz/foo", "repo");
REQUIRE(desc);
- CHECK(*desc ==
- ArtifactDescription(std::filesystem::path{"baz/foo"}, "repo"));
+ CHECK(*desc == ArtifactDescription::CreateLocal(
+ std::filesystem::path{"baz/foo"}, "repo"));
CHECK(root.ToArtifactDescription("does_not_exist", "repo"));
}
@@ -381,17 +381,17 @@ TEST_CASE("Creating artifact descriptions", "[file_root]") {
auto foo = root->ToArtifactDescription("baz/foo", "repo");
REQUIRE(foo);
- CHECK(*foo ==
- ArtifactDescription{ArtifactDigest{kFooId, 3, /*is_tree=*/false},
- ObjectType::File,
- "repo"});
+ CHECK(*foo == ArtifactDescription::CreateKnown(
+ ArtifactDigest{kFooId, 3, /*is_tree=*/false},
+ ObjectType::File,
+ "repo"));
auto bar = root->ToArtifactDescription("baz/bar", "repo");
REQUIRE(bar);
- CHECK(*bar ==
- ArtifactDescription{ArtifactDigest{kBarId, 3, /*is_tree=*/false},
- ObjectType::Executable,
- "repo"});
+ CHECK(*bar == ArtifactDescription::CreateKnown(
+ ArtifactDigest{kBarId, 3, /*is_tree=*/false},
+ ObjectType::Executable,
+ "repo"));
CHECK_FALSE(root->ToArtifactDescription("baz", "repo"));
CHECK_FALSE(root->ToArtifactDescription("does_not_exist", "repo"));
@@ -404,8 +404,8 @@ TEST_CASE("Creating artifact descriptions", "[file_root]") {
auto desc = root.ToArtifactDescription("baz/foo", "repo");
REQUIRE(desc);
- CHECK(*desc ==
- ArtifactDescription(std::filesystem::path{"baz/foo"}, "repo"));
+ CHECK(*desc == ArtifactDescription::CreateLocal(
+ std::filesystem::path{"baz/foo"}, "repo"));
CHECK(root.ToArtifactDescription("does_not_exist", "repo"));
}
@@ -419,17 +419,17 @@ TEST_CASE("Creating artifact descriptions", "[file_root]") {
auto foo = root->ToArtifactDescription("baz/foo", "repo");
REQUIRE(foo);
- CHECK(*foo ==
- ArtifactDescription{ArtifactDigest{kFooId, 3, /*is_tree=*/false},
- ObjectType::File,
- "repo"});
+ CHECK(*foo == ArtifactDescription::CreateKnown(
+ ArtifactDigest{kFooId, 3, /*is_tree=*/false},
+ ObjectType::File,
+ "repo"));
auto bar = root->ToArtifactDescription("baz/bar", "repo");
REQUIRE(bar);
- CHECK(*bar ==
- ArtifactDescription{ArtifactDigest{kBarId, 3, /*is_tree=*/false},
- ObjectType::Executable,
- "repo"});
+ CHECK(*bar == ArtifactDescription::CreateKnown(
+ ArtifactDigest{kBarId, 3, /*is_tree=*/false},
+ ObjectType::Executable,
+ "repo"));
CHECK_FALSE(root->ToArtifactDescription("baz", "repo"));
CHECK_FALSE(root->ToArtifactDescription("does_not_exist", "repo"));