Reduce unnecessary inclusions of `detail/common.hpp`
Change-Id: I79dcd05297594ccd4489d8cddddb879655373cc0
diff --git a/tests/unit/clock-fixture.cpp b/tests/unit/clock-fixture.cpp
index 0efe19c..07afd85 100644
--- a/tests/unit/clock-fixture.cpp
+++ b/tests/unit/clock-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -24,8 +24,8 @@
namespace ndn::tests {
ClockFixture::ClockFixture()
- : m_steadyClock(make_shared<time::UnitTestSteadyClock>())
- , m_systemClock(make_shared<time::UnitTestSystemClock>())
+ : m_steadyClock(std::make_shared<time::UnitTestSteadyClock>())
+ , m_systemClock(std::make_shared<time::UnitTestSystemClock>())
{
time::setCustomClocks(m_steadyClock, m_systemClock);
}
diff --git a/tests/unit/clock-fixture.hpp b/tests/unit/clock-fixture.hpp
index a0309ae..d4a2c96 100644
--- a/tests/unit/clock-fixture.hpp
+++ b/tests/unit/clock-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -74,8 +74,8 @@
}
protected:
- shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
- shared_ptr<time::UnitTestSystemClock> m_systemClock;
+ std::shared_ptr<time::UnitTestSteadyClock> m_steadyClock;
+ std::shared_ptr<time::UnitTestSystemClock> m_systemClock;
};
} // namespace ndn::tests
diff --git a/tests/unit/detail/cancel-handle.t.cpp b/tests/unit/detail/cancel-handle.t.cpp
index e35fe55..173811c 100644
--- a/tests/unit/detail/cancel-handle.t.cpp
+++ b/tests/unit/detail/cancel-handle.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -106,10 +106,10 @@
BOOST_AUTO_TEST_CASE(MoveConstruct)
{
int nCancels = 0;
- unique_ptr<ScopedTestHandle> hdl1;
+ std::unique_ptr<ScopedTestHandle> hdl1;
{
ScopedTestHandle hdl2 = makeDummyCancelHandle(nCancels);
- hdl1 = make_unique<ScopedTestHandle>(std::move(hdl2));
+ hdl1 = std::make_unique<ScopedTestHandle>(std::move(hdl2));
} // hdl2 goes out of scope
BOOST_CHECK_EQUAL(nCancels, 0);
hdl1.reset();
diff --git a/tests/unit/encoding/buffer-stream.t.cpp b/tests/unit/encoding/buffer-stream.t.cpp
index 7442299..e505c3d 100644
--- a/tests/unit/encoding/buffer-stream.t.cpp
+++ b/tests/unit/encoding/buffer-stream.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -32,7 +32,7 @@
{
OBufferStream os;
- shared_ptr<Buffer> buf = os.buf();
+ std::shared_ptr<Buffer> buf = os.buf();
BOOST_CHECK_EQUAL(buf->size(), 0);
}
@@ -42,7 +42,7 @@
os.put(0x33);
os.put(0x44);
- shared_ptr<Buffer> buf = os.buf();
+ std::shared_ptr<Buffer> buf = os.buf();
BOOST_REQUIRE_EQUAL(buf->size(), 2);
BOOST_CHECK_EQUAL(buf->at(0), 0x33);
BOOST_CHECK_EQUAL(buf->at(1), 0x44);
@@ -53,7 +53,7 @@
OBufferStream os;
os.write("\x11\x22", 2);
- shared_ptr<Buffer> buf = os.buf();
+ std::shared_ptr<Buffer> buf = os.buf();
BOOST_REQUIRE_EQUAL(buf->size(), 2);
BOOST_CHECK_EQUAL(buf->at(0), 0x11);
BOOST_CHECK_EQUAL(buf->at(1), 0x22);
@@ -61,7 +61,7 @@
BOOST_AUTO_TEST_CASE(Destructor) // Bug 3727
{
- auto os = make_unique<OBufferStream>();
+ auto os = std::make_unique<OBufferStream>();
auto buf = os->buf();
*os << 'x';
// do NOT flush or call buf() here
diff --git a/tests/unit/net/dns.t.cpp b/tests/unit/net/dns.t.cpp
index 17c5438..c1e8679 100644
--- a/tests/unit/net/dns.t.cpp
+++ b/tests/unit/net/dns.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/net/dns.hpp"
+#include "ndn-cxx/detail/common.hpp"
#include "tests/boost-test.hpp"
#include "tests/unit/net/network-configuration-detector.hpp"
diff --git a/tests/unit/util/rtt-estimator.t.cpp b/tests/unit/util/rtt-estimator.t.cpp
index 7070fb0..0d3877e 100644
--- a/tests/unit/util/rtt-estimator.t.cpp
+++ b/tests/unit/util/rtt-estimator.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2023, Regents of the University of California,
+ * Copyright (c) 2016-2024, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -58,7 +58,7 @@
BOOST_AUTO_TEST_CASE(EstimatedRto)
{
- auto opts = make_shared<RttEstimator::Options>();
+ auto opts = std::make_shared<RttEstimator::Options>();
opts->initialRto = 400_ms;
opts->maxRto = 2_s;
RttEstimator rttEstimator(opts);
@@ -112,7 +112,7 @@
BOOST_AUTO_TEST_CASE(BackoffRto)
{
- auto opts = make_shared<RttEstimator::Options>();
+ auto opts = std::make_shared<RttEstimator::Options>();
opts->initialRto = 500_ms;
opts->maxRto = 4_s;
RttEstimator rttEstimator(opts);