summaryrefslogtreecommitdiff
path: root/test/buildtool/common/repository_config.test.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-10-24 15:25:27 +0200
committerAlberto Sartori <alberto.sartori@huawei.com>2023-11-15 20:19:18 +0100
commit981b9b10d6f48fb2768110a9f81a5f4e880406b2 (patch)
tree9d3afb2e9c65862fe70cc1e476b5f4ae87e45183 /test/buildtool/common/repository_config.test.cpp
parentfe907ca625657dce0e2f08f2129cf36c840602d3 (diff)
downloadjustbuild-981b9b10d6f48fb2768110a9f81a5f4e880406b2.tar.gz
FileRoot: Add new absent root underlying type variant
Absent roots are characterised only by a Git tree hash, so a new variant of the underlying stored information was added in the form of a plain string. In order to avoid unwanted implicit conversions when instantiating via literal strings, we force callers of the constructors to explicitly differentiate between plain strings and filesystem paths. Existing tests were updated to reflect this. Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
Diffstat (limited to 'test/buildtool/common/repository_config.test.cpp')
-rw-r--r--test/buildtool/common/repository_config.test.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/buildtool/common/repository_config.test.cpp b/test/buildtool/common/repository_config.test.cpp
index 29c89d50..cfde95ed 100644
--- a/test/buildtool/common/repository_config.test.cpp
+++ b/test/buildtool/common/repository_config.test.cpp
@@ -43,7 +43,7 @@ namespace {
return std::move(*root);
}
}
- return FileRoot{"missing"};
+ return FileRoot{std::filesystem::path{"missing"}};
}
[[nodiscard]] auto CreateFixedRepoInfo(
@@ -61,7 +61,7 @@ namespace {
std::string const& tfn = "TARGETS",
std::string const& rfn = "RULES",
std::string const& efn = "EXPRESSIONS") {
- static auto const kFileRoot = FileRoot{"file path"};
+ static auto const kFileRoot = FileRoot{std::filesystem::path{"file path"}};
return RepositoryConfig::RepositoryInfo{
kFileRoot, kFileRoot, kFileRoot, kFileRoot, bindings, tfn, rfn, efn};
}