summaryrefslogtreecommitdiff
path: root/test/buildtool/common
diff options
context:
space:
mode:
authorKlaus Aehlig <klaus.aehlig@huawei.com>2022-06-15 14:51:03 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2022-06-20 17:40:44 +0200
commit9d5047bb2b6d1756385fc4fabf2a3d54d9e9ac93 (patch)
tree7963d227ddc056f65c544e0e086d4a1f34985687 /test/buildtool/common
parent17f2cab4490f075a5cb9e975e4b92c06572270ca (diff)
downloadjustbuild-9d5047bb2b6d1756385fc4fabf2a3d54d9e9ac93.tar.gz
Repository representation: also use string as name in bindings
In this way, we keep the repsitory description more close to a normal multi-repository configuration. The only difference remaining is the absence of repository locations for git-tree roots.
Diffstat (limited to 'test/buildtool/common')
-rw-r--r--test/buildtool/common/repository_config.test.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/buildtool/common/repository_config.test.cpp b/test/buildtool/common/repository_config.test.cpp
index b62dbd68..19ab25c2 100644
--- a/test/buildtool/common/repository_config.test.cpp
+++ b/test/buildtool/common/repository_config.test.cpp
@@ -70,7 +70,7 @@ template <class T>
// build graph: {"0": (info0 + bindings0), "1": (info1 + bindings1), ...}
[[nodiscard]] auto BuildGraph(
std::vector<RepositoryConfig::RepositoryInfo const*> const& infos,
- std::vector<std::unordered_map<std::string, int>> const& bindings)
+ std::vector<std::unordered_map<std::string, std::string>> const& bindings)
-> nlohmann::json {
auto graph = nlohmann::json::object();
for (std::size_t i{}; i < infos.size(); ++i) {
@@ -169,7 +169,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
// verify created graph from CAS
CHECK(ReadGraph(*foo_key) ==
BuildGraph({config.Info("foo"), config.Info("baz0")},
- {{{"dep", 1}}, {}}));
+ {{{"dep", "1"}}, {}}));
}
SECTION("with cyclic dependency") {
@@ -188,7 +188,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
// verify created graph from CAS
CHECK(ReadGraph(*foo_key) ==
BuildGraph({config.Info("foo"), config.Info("baz0")},
- {{{"dep", 1}}, {{"foo", 0}, {"bar", 0}}}));
+ {{{"dep", "1"}}, {{"foo", "0"}, {"bar", "0"}}}));
}
SECTION("with two separate cyclic graphs") {
@@ -205,7 +205,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
// verify created graph from CAS
CHECK(ReadGraph(*foo_key) ==
- BuildGraph({config.Info("foo")}, {{{"dep", 0}}}));
+ BuildGraph({config.Info("foo")}, {{{"dep", "0"}}}));
}
SECTION("for graph with leaf repos refering to themselfs") {
@@ -227,6 +227,6 @@ TEST_CASE_METHOD(HermeticLocalTestFixture,
// verify created graph from CAS
CHECK(ReadGraph(*foo_key) ==
- BuildGraph({config.Info("foo")}, {{{"dep", 0}}}));
+ BuildGraph({config.Info("foo")}, {{{"dep", "0"}}}));
}
}