From f2c4795f4f4e3868291de37f0d481251649e37a4 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 17 Oct 2022 09:38:25 -0700 Subject: [PATCH] core tests: absl::make_unique -> std::make_unique (#31361) * core tests: absl::make_unique -> std::make_unique * iwyu --- test/core/client_channel/lb_policy/lb_policy_test_lib.h | 3 +-- test/core/event_engine/posix/posix_endpoint_test.cc | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/test/core/client_channel/lb_policy/lb_policy_test_lib.h b/test/core/client_channel/lb_policy/lb_policy_test_lib.h index 987a28c7ef3..e61fc2c3caf 100644 --- a/test/core/client_channel/lb_policy/lb_policy_test_lib.h +++ b/test/core/client_channel/lb_policy/lb_policy_test_lib.h @@ -30,7 +30,6 @@ #include #include "absl/base/thread_annotations.h" -#include "absl/memory/memory.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/string_view.h" @@ -302,7 +301,7 @@ class LoadBalancingPolicyTest : public ::testing::Test { // Creates a new FakeHelper for the new LB policy, and sets helper_ to // point to the FakeHelper. OrphanablePtr MakeLbPolicy(absl::string_view name) { - auto helper = absl::make_unique(this, work_serializer_); + auto helper = std::make_unique(this, work_serializer_); helper_ = helper.get(); LoadBalancingPolicy::Args args = {work_serializer_, std::move(helper), ChannelArgs()}; diff --git a/test/core/event_engine/posix/posix_endpoint_test.cc b/test/core/event_engine/posix/posix_endpoint_test.cc index 9f92b769396..607ca8121dc 100644 --- a/test/core/event_engine/posix/posix_endpoint_test.cc +++ b/test/core/event_engine/posix/posix_endpoint_test.cc @@ -22,7 +22,6 @@ #include #include -#include "absl/memory/memory.h" #include "absl/status/statusor.h" #include "absl/strings/str_cat.h" #include "absl/strings/str_split.h" @@ -85,7 +84,7 @@ std::list CreateConnectedEndpoints( std::shared_ptr posix_ee, std::shared_ptr oracle_ee) { std::list connections; - auto memory_quota = absl::make_unique("bar"); + auto memory_quota = std::make_unique("bar"); std::string target_addr = absl::StrCat( "ipv6:[::1]:", std::to_string(grpc_pick_unused_port_or_die())); EventEngine::ResolvedAddress resolved_addr = @@ -112,7 +111,7 @@ std::list CreateConnectedEndpoints( auto listener = oracle_ee->CreateListener( std::move(accept_cb), [](absl::Status status) { ASSERT_TRUE(status.ok()); }, config, - absl::make_unique("foo")); + std::make_unique("foo")); GPR_ASSERT(listener.ok()); EXPECT_TRUE((*listener)->Bind(resolved_addr).ok()); @@ -199,7 +198,7 @@ class PosixEndpointTest : public ::testing::TestWithParam { oracle_ee_ = std::make_shared(); posix_ee_ = std::make_shared(); scheduler_ = - absl::make_unique( + std::make_unique( posix_ee_.get()); EXPECT_NE(scheduler_, nullptr); poller_ = GetDefaultPoller(scheduler_.get());