Switch to Face::getIoContext()
Change-Id: I34bb49dc96e91e6f0ff8f9be9185949df3a9739c
diff --git a/tests/clock-fixture.cpp b/tests/clock-fixture.cpp
index 472e489..765511c 100644
--- a/tests/clock-fixture.cpp
+++ b/tests/clock-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -26,13 +26,11 @@
#include "clock-fixture.hpp"
-namespace ndn {
-namespace ndns {
-namespace tests {
+namespace ndn::ndns::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);
}
@@ -58,6 +56,4 @@
}
}
-} // namespace tests
-} // namespace ndns
-} // namespace ndn
+} // namespace ndn::ndns::tests
diff --git a/tests/clock-fixture.hpp b/tests/clock-fixture.hpp
index 48a0f73..9cbc16e 100644
--- a/tests/clock-fixture.hpp
+++ b/tests/clock-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, Regents of the University of California,
+ * Copyright (c) 2014-2024, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -29,9 +29,7 @@
#include <ndn-cxx/util/time-unit-test-clock.hpp>
-namespace ndn {
-namespace ndns {
-namespace tests {
+namespace ndn::ndns::tests {
/** \brief A test fixture that overrides steady clock and system clock.
*/
@@ -81,12 +79,10 @@
}
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 tests
-} // namespace ndns
-} // namespace ndn
+} // namespace ndn::ndns::tests
#endif // NDNS_TESTS_CLOCK_FIXTURE_HPP
diff --git a/tests/unit/daemon/name-server.t.cpp b/tests/unit/daemon/name-server.t.cpp
index 59c9197..63b1576 100644
--- a/tests/unit/daemon/name-server.t.cpp
+++ b/tests/unit/daemon/name-server.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2023, Regents of the University of California.
+ * Copyright (c) 2014-2024, Regents of the University of California.
*
* This file is part of NDNS (Named Data Networking Domain Name Service).
* See AUTHORS.md for complete list of NDNS authors and contributors.
@@ -50,8 +50,8 @@
void
run()
{
- face.getIoService().poll();
- face.getIoService().reset();
+ face.getIoContext().poll();
+ face.getIoContext().reset();
}
public: