Further reduce the use of std::bind()
And also avoid deprecated ndn-cxx type aliases
Change-Id: I87e903b9671a3cf1c1b9ab30d4594d595c3c6da9
diff --git a/tests/daemon/face/generic-link-service.t.cpp b/tests/daemon/face/generic-link-service.t.cpp
index 06d9417..8346a31 100644
--- a/tests/daemon/face/generic-link-service.t.cpp
+++ b/tests/daemon/face/generic-link-service.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -580,7 +580,7 @@
options.allowCongestionMarking = true;
options.baseCongestionMarkingInterval = 100_ms;
initialize(options, MTU_UNLIMITED, 65536);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
@@ -594,7 +594,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
lp::Packet pkt1(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt1.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
@@ -604,7 +604,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
lp::Packet pkt2(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt2.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
}
@@ -615,7 +615,7 @@
options.allowCongestionMarking = true;
options.baseCongestionMarkingInterval = 100_ms;
initialize(options, MTU_UNLIMITED, 65536);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
@@ -627,7 +627,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
lp::Packet pkt0(transport->sentPackets.back());
BOOST_REQUIRE_EQUAL(pkt0.count<lp::CongestionMarkField>(), 0);
- time::steady_clock::TimePoint nextMarkTime = time::steady_clock::now() + 100_ms;
+ auto nextMarkTime = time::steady_clock::now() + 100_ms;
BOOST_CHECK_EQUAL(service->m_nextMarkTime, nextMarkTime);
time::nanoseconds markingInterval(
@@ -747,7 +747,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 9);
lp::Packet pkt8(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt8.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 4);
@@ -823,7 +823,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 14);
lp::Packet pkt13(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt13.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 6);
@@ -847,7 +847,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 16);
lp::Packet pkt15(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt15.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 6);
}
@@ -858,7 +858,7 @@
options.allowCongestionMarking = true;
options.baseCongestionMarkingInterval = 100_ms;
initialize(options, MTU_UNLIMITED, QUEUE_UNSUPPORTED);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
@@ -873,7 +873,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 1);
lp::Packet pkt1(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt1.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
@@ -883,7 +883,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 2);
lp::Packet pkt2(transport->sentPackets.back());
BOOST_CHECK_EQUAL(pkt2.count<lp::CongestionMarkField>(), 0);
- BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(service->m_nextMarkTime, time::steady_clock::time_point::max());
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
@@ -893,7 +893,7 @@
BOOST_REQUIRE_EQUAL(transport->sentPackets.size(), 3);
lp::Packet pkt3(transport->sentPackets.back());
BOOST_REQUIRE_EQUAL(pkt3.count<lp::CongestionMarkField>(), 0);
- time::steady_clock::TimePoint nextMarkTime = time::steady_clock::now() + 100_ms;
+ auto nextMarkTime = time::steady_clock::now() + 100_ms;
BOOST_CHECK_EQUAL(service->m_nextMarkTime, nextMarkTime);
BOOST_CHECK_EQUAL(service->m_nMarkedSinceInMarkingState, 0);
BOOST_CHECK_EQUAL(service->getCounters().nCongestionMarked, 0);
diff --git a/tests/daemon/face/null-face.t.cpp b/tests/daemon/face/null-face.t.cpp
index 451f21c..e2a48b5 100644
--- a/tests/daemon/face/null-face.t.cpp
+++ b/tests/daemon/face/null-face.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -56,7 +56,7 @@
{
auto transport = make_unique<NullTransport>();
- BOOST_CHECK_EQUAL(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(transport->getExpirationTime(), time::steady_clock::time_point::max());
}
BOOST_AUTO_TEST_CASE(SendQueue)
diff --git a/tests/daemon/face/unicast-ethernet-transport.t.cpp b/tests/daemon/face/unicast-ethernet-transport.t.cpp
index 6e4dd6b..373bcc3 100644
--- a/tests/daemon/face/unicast-ethernet-transport.t.cpp
+++ b/tests/daemon/face/unicast-ethernet-transport.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -111,13 +111,13 @@
{
SKIP_IF_ETHERNET_NETIF_COUNT_LT(1);
initializeUnicast(nullptr, ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
- BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::time_point::max());
transport->setPersistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
- BOOST_CHECK_EQUAL(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(transport->getExpirationTime(), time::steady_clock::time_point::max());
transport->setPersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
- BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::time_point::max());
}
BOOST_AUTO_TEST_CASE(Close)
diff --git a/tests/daemon/face/unicast-udp-transport.t.cpp b/tests/daemon/face/unicast-udp-transport.t.cpp
index e69904a..b85747d 100644
--- a/tests/daemon/face/unicast-udp-transport.t.cpp
+++ b/tests/daemon/face/unicast-udp-transport.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -67,13 +67,13 @@
BOOST_AUTO_TEST_CASE(ExpirationTime)
{
TRANSPORT_TEST_INIT(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
- BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::time_point::max());
transport->setPersistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
- BOOST_CHECK_EQUAL(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_EQUAL(transport->getExpirationTime(), time::steady_clock::time_point::max());
transport->setPersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
- BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::TimePoint::max());
+ BOOST_CHECK_NE(transport->getExpirationTime(), time::steady_clock::time_point::max());
}
BOOST_AUTO_TEST_CASE(IdleClose)
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.hpp b/tests/daemon/mgmt/face-manager-command-fixture.hpp
index ad354f3..1b7d0e9 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.hpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -48,7 +48,7 @@
findFaceIdByUri(const std::string& uri) const;
public:
- ndn::util::DummyClientFace face;
+ ndn::DummyClientFace face;
Dispatcher dispatcher;
shared_ptr<CommandAuthenticator> authenticator;
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index e40a0ce..56db14a 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -45,7 +45,7 @@
FaceTable m_faceTable;
Forwarder m_forwarder;
ForwarderStatusManager m_manager;
- time::system_clock::TimePoint m_startTime;
+ time::system_clock::time_point m_startTime;
};
BOOST_AUTO_TEST_SUITE(Mgmt)
diff --git a/tests/daemon/mgmt/manager-common-fixture.hpp b/tests/daemon/mgmt/manager-common-fixture.hpp
index b0ddf08..954cef2 100644
--- a/tests/daemon/mgmt/manager-common-fixture.hpp
+++ b/tests/daemon/mgmt/manager-common-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -146,7 +146,7 @@
concatenateResponses(size_t startIndex = 0, size_t nResponses = 0);
protected:
- ndn::util::DummyClientFace m_face{g_io, m_keyChain, {true, true}};
+ ndn::DummyClientFace m_face{g_io, m_keyChain, {true, true}};
Dispatcher m_dispatcher{m_face, m_keyChain};
std::vector<Data>& m_responses{m_face.sentData};
};
diff --git a/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
index 1108a06..6c82d4a 100644
--- a/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
+++ b/tests/daemon/mgmt/rib-manager-sl-announce.t.cpp
@@ -178,7 +178,7 @@
unique_ptr<RibManager> manager;
private:
- ndn::util::DummyClientFace m_face;
+ ndn::DummyClientFace m_face;
ndn::nfd::Controller m_nfdController;
Dispatcher m_dispatcher;
MockFibUpdater m_fibUpdater;
diff --git a/tests/daemon/rib/fib-updates-common.hpp b/tests/daemon/rib/fib-updates-common.hpp
index 9ceaeab..33b549d 100644
--- a/tests/daemon/rib/fib-updates-common.hpp
+++ b/tests/daemon/rib/fib-updates-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -165,7 +165,7 @@
}
public:
- ndn::util::DummyClientFace face;
+ ndn::DummyClientFace face;
ndn::nfd::Controller controller;
rib::Rib rib;
diff --git a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
index 36ca585..85624c2 100644
--- a/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
+++ b/tests/daemon/rib/readvertise/nfd-rib-readvertise-destination.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -55,7 +55,7 @@
uint32_t nFailureCallbacks;
protected:
- ndn::util::DummyClientFace face;
+ ndn::DummyClientFace face;
ndn::nfd::Controller controller;
Rib rib;
NfdRibReadvertiseDestination dest;
diff --git a/tests/daemon/rib/readvertise/readvertise.t.cpp b/tests/daemon/rib/readvertise/readvertise.t.cpp
index 6242dfc..06f905f 100644
--- a/tests/daemon/rib/readvertise/readvertise.t.cpp
+++ b/tests/daemon/rib/readvertise/readvertise.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -157,7 +157,7 @@
unique_ptr<Readvertise> readvertise;
private:
- ndn::util::DummyClientFace m_face;
+ ndn::DummyClientFace m_face;
Rib m_rib;
};
diff --git a/tests/tools/mock-nfd-mgmt-fixture.hpp b/tests/tools/mock-nfd-mgmt-fixture.hpp
index 8f052eb..ede5568 100644
--- a/tests/tools/mock-nfd-mgmt-fixture.hpp
+++ b/tests/tools/mock-nfd-mgmt-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -204,7 +204,7 @@
}
protected:
- ndn::util::DummyClientFace face;
+ ndn::DummyClientFace face;
std::function<void(const Interest&)> processInterest;
};
diff --git a/tests/tools/ndn-autoconfig-server/program.t.cpp b/tests/tools/ndn-autoconfig-server/program.t.cpp
index c70cedd..ee99740 100644
--- a/tests/tools/ndn-autoconfig-server/program.t.cpp
+++ b/tests/tools/ndn-autoconfig-server/program.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2022, Regents of the University of California,
+ * Copyright (c) 2014-2023, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -46,7 +46,7 @@
}
protected:
- util::DummyClientFace face{{true, true}};
+ DummyClientFace face{{true, true}};
unique_ptr<Program> program;
};
@@ -88,12 +88,11 @@
}
this->initialize(options);
- util::DummyClientFace clientFace(face.getIoService());
+ DummyClientFace clientFace(face.getIoService());
clientFace.linkTo(face);
Name baseName("/localhop/nfd/rib/routable-prefixes");
- auto fetcher = util::SegmentFetcher::start(clientFace, Interest(baseName),
- security::getAcceptAllValidator());
+ auto fetcher = SegmentFetcher::start(clientFace, Interest(baseName), security::getAcceptAllValidator());
fetcher->afterSegmentReceived.connect([baseName] (const Data& data) {
const Name& dataName = data.getName();
BOOST_CHECK_EQUAL(dataName.size(), baseName.size() + 2);
diff --git a/tests/tools/nfdc/status-report.t.cpp b/tests/tools/nfdc/status-report.t.cpp
index 04b9b86..dcf797c 100644
--- a/tests/tools/nfdc/status-report.t.cpp
+++ b/tests/tools/nfdc/status-report.t.cpp
@@ -149,7 +149,7 @@
}
protected:
- ndn::util::DummyClientFace face;
+ ndn::DummyClientFace face;
ValidatorNull validator;
ndn::nfd::Controller controller;
StatusReportTester report;