build: switch to C++17
Change-Id: Id6217b5c993f3e4726e89773128b565e5f136bb6
diff --git a/tests/ping/client/ping.t.cpp b/tests/ping/client/ping.t.cpp
index a0eb163..a008271 100644
--- a/tests/ping/client/ping.t.cpp
+++ b/tests/ping/client/ping.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2021, Arizona Board of Regents.
+ * Copyright (c) 2014-2022, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -24,10 +24,7 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace ndn {
-namespace ping {
-namespace client {
-namespace tests {
+namespace ndn::ping::client::tests {
using namespace ndn::tests;
@@ -96,7 +93,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestClient
BOOST_AUTO_TEST_SUITE_END() // Ping
-} // namespace tests
-} // namespace client
-} // namespace ping
-} // namespace ndn
+} // namespace ndn::ping::client::tests
diff --git a/tests/ping/client/statistics-collector.t.cpp b/tests/ping/client/statistics-collector.t.cpp
index 270c576..9d5423a 100644
--- a/tests/ping/client/statistics-collector.t.cpp
+++ b/tests/ping/client/statistics-collector.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2016, Arizona Board of Regents.
+/*
+ * Copyright (c) 2014-2022, Arizona Board of Regents.
*
* This file is part of ndn-tools (Named Data Networking Essential Tools).
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
@@ -20,46 +20,34 @@
#include "tools/ping/client/statistics-collector.hpp"
#include "tests/test-common.hpp"
+
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace ndn {
-namespace ping {
-namespace client {
-namespace tests {
-
-using namespace ndn::tests;
+namespace ndn::ping::client::tests {
class StatisticsCollectorFixture
{
-protected:
- StatisticsCollectorFixture()
- : pingOptions(makeOptions())
- , pingProgram(face, pingOptions)
- , sc(pingProgram, pingOptions)
- {
- }
-
private:
static Options
makeOptions()
{
Options opt;
- opt.prefix = "ndn:/ping-prefix";
+ opt.prefix = "/ping-prefix";
opt.shouldAllowStaleData = false;
opt.shouldGenerateRandomSeq = false;
opt.shouldPrintTimestamp = false;
opt.nPings = 5;
- opt.interval = time::milliseconds(100);
- opt.timeout = time::milliseconds(2000);
+ opt.interval = 100_ms;
+ opt.timeout = 2_s;
opt.startSeq = 1;
return opt;
}
protected:
util::DummyClientFace face;
- Options pingOptions;
- Ping pingProgram;
- StatisticsCollector sc;
+ Options pingOptions{makeOptions()};
+ Ping pingProgram{face, pingOptions};
+ StatisticsCollector sc{pingProgram, pingOptions};
};
BOOST_AUTO_TEST_SUITE(Ping)
@@ -211,7 +199,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestStatisticsCollector
BOOST_AUTO_TEST_SUITE_END() // Ping
-} // namespace tests
-} // namespace client
-} // namespace ping
-} // namespace ndn
+} // namespace ndn::ping::client::tests