summaryrefslogtreecommitdiff
path: root/test/buildtool/build_engine/target_map/target_map.test.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-29 11:13:08 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commitb393090c220da61dd1c197adfac42dc47ad74f8a (patch)
tree72fb8ea9e5a9a4f9c01017c0601720b98909e3a8 /test/buildtool/build_engine/target_map/target_map.test.cpp
parent6089297787902f9a38a678e2ffdf639e779a1594 (diff)
downloadjustbuild-b393090c220da61dd1c197adfac42dc47ad74f8a.tar.gz
ApiBundle: Use a creator method instead of constructor
This will allow for ApiBundle to be used together with the TestApi implementation of IExecutionApi in tests. Also rename CreateRemote method to MakeRemote in order to remove any semantical confusion.
Diffstat (limited to 'test/buildtool/build_engine/target_map/target_map.test.cpp')
-rw-r--r--test/buildtool/build_engine/target_map/target_map.test.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/test/buildtool/build_engine/target_map/target_map.test.cpp b/test/buildtool/build_engine/target_map/target_map.test.cpp
index ed859e31..ddcecdd0 100644
--- a/test/buildtool/build_engine/target_map/target_map.test.cpp
+++ b/test/buildtool/build_engine/target_map/target_map.test.cpp
@@ -126,9 +126,9 @@ TEST_CASE("simple targets", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
AnalyseContext ctx{.repo_config = &repo_config,
@@ -589,9 +589,9 @@ TEST_CASE("configuration deduplication", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
@@ -699,9 +699,9 @@ TEST_CASE("generator functions in string arguments", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
@@ -821,9 +821,9 @@ TEST_CASE("built-in rules", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
@@ -1055,9 +1055,9 @@ TEST_CASE("target reference", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
@@ -1220,9 +1220,9 @@ TEST_CASE("trees", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
@@ -1349,9 +1349,9 @@ TEST_CASE("RESULT error reporting", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);
@@ -1537,9 +1537,9 @@ TEST_CASE("wrong arguments", "[target_map]") {
.retry_config = &retry_config,
.exec_config = &remote_exec_config};
- ApiBundle const apis{&local_context,
- &remote_context,
- /*repo_config=*/nullptr};
+ auto const apis = ApiBundle::Create(&local_context,
+ &remote_context,
+ /*repo_config=*/nullptr);
auto serve =
ServeApi::Create(*serve_config, &local_context, &remote_context, &apis);