From 3f75861a2d60fc5a2fd9c9894267f1df72f66c47 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 25 Jun 2024 16:47:10 +0200 Subject: Use a raw pointer for passing optional RepositoryConfig ...instead of std::optional>. --- .../build_engine/target_map/target_map.test.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'test/buildtool/build_engine/target_map/target_map.test.cpp') 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 c2be76df..fa9e2890 100644 --- a/test/buildtool/build_engine/target_map/target_map.test.cpp +++ b/test/buildtool/build_engine/target_map/target_map.test.cpp @@ -99,7 +99,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "simple targets", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -542,7 +542,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -630,7 +630,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -728,7 +728,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "built-in rules", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -936,7 +936,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "target reference", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -1077,7 +1077,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "trees", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -1184,7 +1184,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), @@ -1348,7 +1348,7 @@ TEST_CASE_METHOD(HermeticLocalTestFixture, "wrong arguments", "[target_map]") { auto serve_config = TestServeConfig::ReadServeConfigFromEnvironment(); REQUIRE(serve_config); - ApiBundle const apis{std::nullopt, RemoteExecutionConfig::RemoteAddress()}; + ApiBundle const apis{nullptr, RemoteExecutionConfig::RemoteAddress()}; auto serve = ServeApi::Create(*serve_config, &apis); AnalyseContext ctx{.repo_config = &repo_config, .target_cache = Storage::Instance().TargetCache(), -- cgit v1.2.3