core tests: absl::make_unique -> std::make_unique (#31361)

* core tests: absl::make_unique -> std::make_unique

* iwyu
pull/31381/head
Mark D. Roth 2 years ago committed by GitHub
parent 7aca6d4007
commit f2c4795f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      test/core/client_channel/lb_policy/lb_policy_test_lib.h
  2. 7
      test/core/event_engine/posix/posix_endpoint_test.cc

@ -30,7 +30,6 @@
#include <vector>
#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<LoadBalancingPolicy> MakeLbPolicy(absl::string_view name) {
auto helper = absl::make_unique<FakeHelper>(this, work_serializer_);
auto helper = std::make_unique<FakeHelper>(this, work_serializer_);
helper_ = helper.get();
LoadBalancingPolicy::Args args = {work_serializer_, std::move(helper),
ChannelArgs()};

@ -22,7 +22,6 @@
#include <thread>
#include <vector>
#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<Connection> CreateConnectedEndpoints(
std::shared_ptr<EventEngine> posix_ee,
std::shared_ptr<EventEngine> oracle_ee) {
std::list<Connection> connections;
auto memory_quota = absl::make_unique<grpc_core::MemoryQuota>("bar");
auto memory_quota = std::make_unique<grpc_core::MemoryQuota>("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<Connection> CreateConnectedEndpoints(
auto listener = oracle_ee->CreateListener(
std::move(accept_cb),
[](absl::Status status) { ASSERT_TRUE(status.ok()); }, config,
absl::make_unique<grpc_core::MemoryQuota>("foo"));
std::make_unique<grpc_core::MemoryQuota>("foo"));
GPR_ASSERT(listener.ok());
EXPECT_TRUE((*listener)->Bind(resolved_addr).ok());
@ -199,7 +198,7 @@ class PosixEndpointTest : public ::testing::TestWithParam<bool> {
oracle_ee_ = std::make_shared<PosixOracleEventEngine>();
posix_ee_ = std::make_shared<PosixEventEngine>();
scheduler_ =
absl::make_unique<grpc_event_engine::posix_engine::TestScheduler>(
std::make_unique<grpc_event_engine::posix_engine::TestScheduler>(
posix_ee_.get());
EXPECT_NE(scheduler_, nullptr);
poller_ = GetDefaultPoller(scheduler_.get());

Loading…
Cancel
Save