build: switch to C++17
Change-Id: Id6217b5c993f3e4726e89773128b565e5f136bb6
diff --git a/tests/chunks/consumer.t.cpp b/tests/chunks/consumer.t.cpp
index 205cfb3..e5a584f 100644
--- a/tests/chunks/consumer.t.cpp
+++ b/tests/chunks/consumer.t.cpp
@@ -39,9 +39,7 @@
#include <boost/test/output_test_stream.hpp>
#endif
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
using namespace ndn::tests;
using boost::test_tools::output_test_stream;
@@ -175,6 +173,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestConsumer
BOOST_AUTO_TEST_SUITE_END() // Chunks
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests
diff --git a/tests/chunks/discover-version.t.cpp b/tests/chunks/discover-version.t.cpp
index 79315cc..7d18886 100644
--- a/tests/chunks/discover-version.t.cpp
+++ b/tests/chunks/discover-version.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2020, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -32,9 +32,7 @@
#include <ndn-cxx/metadata-object.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
using namespace ndn::tests;
@@ -215,6 +213,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestDiscoverVersion
BOOST_AUTO_TEST_SUITE_END() // Chunks
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests
diff --git a/tests/chunks/pipeline-interests-aimd.t.cpp b/tests/chunks/pipeline-interests-aimd.t.cpp
index feed933..0946021 100644
--- a/tests/chunks/pipeline-interests-aimd.t.cpp
+++ b/tests/chunks/pipeline-interests-aimd.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2020, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -29,17 +29,14 @@
#include "pipeline-interests-fixture.hpp"
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
using namespace ndn::tests;
class PipelineInterestAimdFixture : public PipelineInterestsFixture
{
-public:
+protected:
PipelineInterestAimdFixture()
- : rttEstimator(makeRttEstimatorOptions())
{
opt.isQuiet = true;
createPipeline();
@@ -70,7 +67,7 @@
protected:
Options opt;
- RttEstimatorWithStats rttEstimator;
+ RttEstimatorWithStats rttEstimator{makeRttEstimatorOptions()};
PipelineInterestsAdaptive* pipeline;
static constexpr double MARGIN = 0.001;
};
@@ -596,6 +593,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestPipelineInterestsAimd
BOOST_AUTO_TEST_SUITE_END() // Chunks
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests
diff --git a/tests/chunks/pipeline-interests-cubic.t.cpp b/tests/chunks/pipeline-interests-cubic.t.cpp
index fc53343..9934d9f 100644
--- a/tests/chunks/pipeline-interests-cubic.t.cpp
+++ b/tests/chunks/pipeline-interests-cubic.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2020, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -29,17 +29,14 @@
#include "pipeline-interests-fixture.hpp"
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
using namespace ndn::tests;
class PipelineInterestCubicFixture : public PipelineInterestsFixture
{
-public:
+protected:
PipelineInterestCubicFixture()
- : rttEstimator(makeRttEstimatorOptions())
{
opt.isQuiet = true;
createPipeline();
@@ -70,7 +67,7 @@
protected:
Options opt;
- RttEstimatorWithStats rttEstimator;
+ RttEstimatorWithStats rttEstimator{makeRttEstimatorOptions()};
PipelineInterestsCubic* pipeline;
static constexpr double MARGIN = 0.001;
};
@@ -562,6 +559,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestPipelineInterestsCubic
BOOST_AUTO_TEST_SUITE_END() // Chunks
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests
diff --git a/tests/chunks/pipeline-interests-fixed.t.cpp b/tests/chunks/pipeline-interests-fixed.t.cpp
index 872fe4e..b4f9723 100644
--- a/tests/chunks/pipeline-interests-fixed.t.cpp
+++ b/tests/chunks/pipeline-interests-fixed.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2020, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -29,9 +29,7 @@
#include "pipeline-interests-fixture.hpp"
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
class PipelineInterestFixedFixture : public PipelineInterestsFixture
{
@@ -298,6 +296,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestPipelineInterests
BOOST_AUTO_TEST_SUITE_END() // Chunks
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests
diff --git a/tests/chunks/pipeline-interests-fixture.hpp b/tests/chunks/pipeline-interests-fixture.hpp
index 643047a..ddfc82b 100644
--- a/tests/chunks/pipeline-interests-fixture.hpp
+++ b/tests/chunks/pipeline-interests-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2020, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -36,9 +36,7 @@
#include <ndn-cxx/util/dummy-client-face.hpp>
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
using namespace ndn::tests;
@@ -88,8 +86,6 @@
unique_ptr<PipelineInterests> m_pipeline;
};
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests
#endif // NDN_TOOLS_TESTS_CHUNKS_PIPELINE_INTERESTS_FIXTURE_HPP
diff --git a/tests/chunks/producer.t.cpp b/tests/chunks/producer.t.cpp
index ef53422..a4a280b 100644
--- a/tests/chunks/producer.t.cpp
+++ b/tests/chunks/producer.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2016-2021, Regents of the University of California,
+ * Copyright (c) 2016-2022, Regents of the University of California,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University.
*
@@ -37,9 +37,7 @@
#include <cmath>
#include <sstream>
-namespace ndn {
-namespace chunks {
-namespace tests {
+namespace ndn::chunks::tests {
using namespace ndn::tests;
@@ -222,6 +220,4 @@
BOOST_AUTO_TEST_SUITE_END() // TestProducer
BOOST_AUTO_TEST_SUITE_END() // Chunks
-} // namespace tests
-} // namespace chunks
-} // namespace ndn
+} // namespace ndn::chunks::tests