tests: respect naming conventions and improve nesting of some test suites
Change-Id: I65af858bc6d10197c6ee11111fa9f7c1faa617ef
Refs: #2497
diff --git a/tests/core/config-file.t.cpp b/tests/core/config-file.t.cpp
index 15ae377..8a41ac2 100644
--- a/tests/core/config-file.t.cpp
+++ b/tests/core/config-file.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -75,40 +75,34 @@
"}\n";
// counts of the respective section counts in config_example.info
-
const int CONFIG_N_A_SECTIONS = 1;
const int CONFIG_N_B_SECTIONS = 1;
class DummySubscriber
{
public:
-
- DummySubscriber(ConfigFile& config,
- int nASections,
- int nBSections,
- bool expectDryRun)
- : m_nASections(nASections),
- m_nBSections(nBSections),
- m_nRemainingACallbacks(nASections),
- m_nRemainingBCallbacks(nBSections),
- m_expectDryRun(expectDryRun)
+ DummySubscriber(ConfigFile& config, int nASections, int nBSections, bool expectDryRun)
+ : m_nASections(nASections)
+ , m_nBSections(nBSections)
+ , m_nRemainingACallbacks(nASections)
+ , m_nRemainingBCallbacks(nBSections)
+ , m_expectDryRun(expectDryRun)
{
-
}
+ virtual
+ ~DummySubscriber() = default;
+
void
onA(const ConfigSection& section, bool isDryRun)
{
- // NFD_LOG_DEBUG("a");
BOOST_CHECK_EQUAL(isDryRun, m_expectDryRun);
--m_nRemainingACallbacks;
}
-
void
onB(const ConfigSection& section, bool isDryRun)
{
- // NFD_LOG_DEBUG("b");
BOOST_CHECK_EQUAL(isDryRun, m_expectDryRun);
--m_nRemainingBCallbacks;
}
@@ -127,12 +121,6 @@
m_nRemainingBCallbacks == m_nBSections;
}
- virtual
- ~DummySubscriber()
- {
-
- }
-
private:
int m_nASections;
int m_nBSections;
@@ -144,7 +132,7 @@
class DummyAllSubscriber : public DummySubscriber
{
public:
- DummyAllSubscriber(ConfigFile& config, bool expectDryRun=false)
+ DummyAllSubscriber(ConfigFile& config, bool expectDryRun = false)
: DummySubscriber(config,
CONFIG_N_A_SECTIONS,
CONFIG_N_B_SECTIONS,
@@ -153,12 +141,6 @@
config.addSectionHandler("a", bind(&DummySubscriber::onA, this, _1, _2));
config.addSectionHandler("b", bind(&DummySubscriber::onB, this, _1, _2));
}
-
- virtual
- ~DummyAllSubscriber()
- {
-
- }
};
class DummyOneSubscriber : public DummySubscriber
@@ -166,7 +148,7 @@
public:
DummyOneSubscriber(ConfigFile& config,
const std::string& sectionName,
- bool expectDryRun=false)
+ bool expectDryRun = false)
: DummySubscriber(config,
(sectionName == "a"),
(sectionName == "b"),
@@ -188,12 +170,6 @@
}
}
-
- virtual
- ~DummyOneSubscriber()
- {
-
- }
};
class DummyNoSubscriber : public DummySubscriber
@@ -202,13 +178,6 @@
DummyNoSubscriber(ConfigFile& config, bool expectDryRun)
: DummySubscriber(config, 0, 0, expectDryRun)
{
-
- }
-
- virtual
- ~DummyNoSubscriber()
- {
-
}
};
@@ -375,8 +344,6 @@
bool m_missingFired;
};
-
-
BOOST_FIXTURE_TEST_CASE(OnConfigUncoveredSections, MissingCallbackFixture)
{
ConfigFile file;
diff --git a/tests/core/manager-base.t.cpp b/tests/core/manager-base.t.cpp
index 49f35b9..2137a01 100644
--- a/tests/core/manager-base.t.cpp
+++ b/tests/core/manager-base.t.cpp
@@ -84,7 +84,6 @@
ManagerTester m_manager;
};
-BOOST_AUTO_TEST_SUITE(Core)
BOOST_FIXTURE_TEST_SUITE(TestManagerBase, ManagerBaseFixture)
BOOST_AUTO_TEST_CASE(RegisterCommandHandler)
@@ -170,7 +169,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestManagerBase
-BOOST_AUTO_TEST_SUITE_END() // Core
} // namespace tests
} // namespace nfd
diff --git a/tests/core/ndebug.t.cpp b/tests/core/ndebug.t.cpp
index a624b6b..3af09aa 100644
--- a/tests/core/ndebug.t.cpp
+++ b/tests/core/ndebug.t.cpp
@@ -38,6 +38,8 @@
// in release builds, assertion shouldn't execute
BOOST_ASSERT(false);
#endif
+ // Trivial check to avoid "test case did not check any assertions" message from Boost.Test
+ BOOST_CHECK(true);
}
BOOST_AUTO_TEST_CASE(SideEffect)
diff --git a/tests/core/network.t.cpp b/tests/core/network.t.cpp
index 74ceaac..043a7dd 100644
--- a/tests/core/network.t.cpp
+++ b/tests/core/network.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -144,7 +144,7 @@
boost::lexical_cast<Network>("2001:db8:3f9:0::/64"));
}
-BOOST_AUTO_TEST_SUITE_END() // CoreNetwork
+BOOST_AUTO_TEST_SUITE_END() // TestNetwork
} // namespace tests
} // namespace nfd
diff --git a/tests/core/scheduler.t.cpp b/tests/core/scheduler.t.cpp
index 45e6e06..a2ad752 100644
--- a/tests/core/scheduler.t.cpp
+++ b/tests/core/scheduler.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -74,6 +74,7 @@
++count3;
}
+public:
int count1;
int count2;
int count3;
@@ -102,17 +103,21 @@
{
EventId i;
scheduler::cancel(i);
+
+ // Trivial check to avoid "test case did not check any assertions" message from Boost.Test
+ BOOST_CHECK(true);
}
class SelfCancelFixture : protected BaseFixture
{
public:
void
- cancelSelf()
+ cancelSelf() const
{
scheduler::cancel(m_selfEventId);
}
+public:
EventId m_selfEventId;
};
@@ -182,7 +187,7 @@
BOOST_CHECK(s1 != s2);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestScheduler
} // namespace tests
} // namespace nfd
diff --git a/tests/daemon/face/lp-reassembler.t.cpp b/tests/daemon/face/lp-reassembler.t.cpp
index 5b62d4e..9cfa8dd 100644
--- a/tests/daemon/face/lp-reassembler.t.cpp
+++ b/tests/daemon/face/lp-reassembler.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -33,11 +33,9 @@
using namespace nfd::tests;
-BOOST_AUTO_TEST_SUITE(Face)
-
class LpReassemblerFixture : public UnitTestTimeFixture
{
-public:
+protected:
LpReassemblerFixture()
{
reassembler.beforeTimeout.connect(
@@ -46,7 +44,7 @@
});
}
-public:
+protected:
LpReassembler reassembler;
std::vector<std::tuple<Transport::EndpointId, size_t>> timeoutHistory;
@@ -58,6 +56,7 @@
0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
};
+BOOST_AUTO_TEST_SUITE(Face)
BOOST_FIXTURE_TEST_SUITE(TestLpReassembler, LpReassemblerFixture)
BOOST_AUTO_TEST_SUITE(SingleFragment)
@@ -460,7 +459,9 @@
BOOST_AUTO_TEST_SUITE_END() // MultiFragment
-BOOST_AUTO_TEST_CASE(MultiRemoteEndpoints)
+BOOST_AUTO_TEST_SUITE(MultipleRemoteEndpoints)
+
+BOOST_AUTO_TEST_CASE(Normal)
{
ndn::Buffer data1Buffer(data, 5);
ndn::Buffer data2Buffer(data + 5, 5);
@@ -510,6 +511,8 @@
BOOST_CHECK_EQUAL(reassembler.size(), 0);
}
+BOOST_AUTO_TEST_SUITE_END() // MultipleRemoteEndpoints
+
BOOST_AUTO_TEST_SUITE_END() // TestLpReassembler
BOOST_AUTO_TEST_SUITE_END() // Face
diff --git a/tests/daemon/face/transport.t.cpp b/tests/daemon/face/transport.t.cpp
index 75bedf8..f1171e5 100644
--- a/tests/daemon/face/transport.t.cpp
+++ b/tests/daemon/face/transport.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -41,15 +41,11 @@
namespace tests {
using namespace nfd::tests;
-namespace ip = boost::asio::ip;
-
-BOOST_AUTO_TEST_SUITE(Face)
-
-using nfd::Face;
+namespace mpl = boost::mpl;
class DummyTransportFixture : public BaseFixture
{
-public:
+protected:
DummyTransportFixture()
: transport(nullptr)
, sentPackets(nullptr)
@@ -68,13 +64,14 @@
this->receivedPackets = &static_cast<DummyReceiveLinkService*>(face->getLinkService())->receivedPackets;
}
-public:
+protected:
unique_ptr<Face> face;
DummyTransport* transport;
std::vector<Transport::Packet>* sentPackets;
std::vector<Transport::Packet>* receivedPackets;
};
+BOOST_AUTO_TEST_SUITE(Face)
BOOST_FIXTURE_TEST_SUITE(TestTransport, DummyTransportFixture)
BOOST_AUTO_TEST_CASE(DummyTransportStaticProperties)
@@ -83,10 +80,6 @@
checkStaticPropertiesInitialized(*transport);
}
-BOOST_AUTO_TEST_SUITE(StateTransition)
-
-namespace mpl = boost::mpl;
-
/** \brief a macro to declare a TransportState as a integral constant
*/
#define TRANSPORT_STATE_C(X) mpl::int_<static_cast<int>(TransportState::X)>
@@ -198,8 +191,6 @@
}
}
-BOOST_AUTO_TEST_SUITE_END() // StateTransition
-
BOOST_AUTO_TEST_CASE(NoExpirationTime)
{
initialize();
diff --git a/tests/daemon/fw/retx-suppression.t.cpp b/tests/daemon/fw/retx-suppression.t.cpp
index 7013aef..604dfb1 100644
--- a/tests/daemon/fw/retx-suppression.t.cpp
+++ b/tests/daemon/fw/retx-suppression.t.cpp
@@ -36,7 +36,8 @@
using namespace nfd::tests;
-BOOST_FIXTURE_TEST_SUITE(FwRetxSuppression, UnitTestTimeFixture)
+BOOST_AUTO_TEST_SUITE(Fw)
+BOOST_FIXTURE_TEST_SUITE(TestRetxSuppression, UnitTestTimeFixture)
BOOST_AUTO_TEST_CASE(Fixed)
{
@@ -155,7 +156,8 @@
// suppression interval is 100ms, until 304ms
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRetxSuppression
+BOOST_AUTO_TEST_SUITE_END() // Fw
} // namespace tests
} // namespace fw
diff --git a/tests/daemon/fw/rtt-estimator.t.cpp b/tests/daemon/fw/rtt-estimator.t.cpp
index 1a19443..b2c3fb6 100644
--- a/tests/daemon/fw/rtt-estimator.t.cpp
+++ b/tests/daemon/fw/rtt-estimator.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -30,7 +30,8 @@
namespace nfd {
namespace tests {
-BOOST_FIXTURE_TEST_SUITE(FwRttEstimator, BaseFixture)
+BOOST_AUTO_TEST_SUITE(Fw)
+BOOST_FIXTURE_TEST_SUITE(TestRttEstimator, BaseFixture)
static inline double
computeRtoAsFloatSeconds(RttEstimator& rtt)
@@ -74,7 +75,8 @@
BOOST_CHECK_GT(rto6, rto1);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRttEstimator
+BOOST_AUTO_TEST_SUITE_END() // Fw
} // namespace tests
} // namespace nfd
diff --git a/tests/daemon/fw/strategy-tester.hpp b/tests/daemon/fw/strategy-tester.hpp
index 3c4ef9b..f9d5de8 100644
--- a/tests/daemon/fw/strategy-tester.hpp
+++ b/tests/daemon/fw/strategy-tester.hpp
@@ -23,8 +23,8 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP
-#define NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP
+#ifndef NFD_TESTS_DAEMON_FW_STRATEGY_TESTER_HPP
+#define NFD_TESTS_DAEMON_FW_STRATEGY_TESTER_HPP
#include <boost/tuple/tuple_comparison.hpp>
#include "fw/strategy.hpp"
@@ -105,4 +105,4 @@
} // namespace fw
} // namespace nfd
-#endif // NFD_TESTS_NFD_FW_STRATEGY_TESTER_HPP
+#endif // NFD_TESTS_DAEMON_FW_STRATEGY_TESTER_HPP
diff --git a/tests/daemon/fw/topology-tester.cpp b/tests/daemon/fw/topology-tester.cpp
index d934e35..5742592 100644
--- a/tests/daemon/fw/topology-tester.cpp
+++ b/tests/daemon/fw/topology-tester.cpp
@@ -75,7 +75,7 @@
return;
}
- for (auto&& p : m_transports) {
+ for (const auto& p : m_transports) {
if (p.first == i) {
continue;
}
diff --git a/tests/daemon/fw/topology-tester.hpp b/tests/daemon/fw/topology-tester.hpp
index 329244b..e5b21da 100644
--- a/tests/daemon/fw/topology-tester.hpp
+++ b/tests/daemon/fw/topology-tester.hpp
@@ -27,16 +27,17 @@
* \brief allows testing forwarding in a network topology
*/
-#ifndef NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP
-#define NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP
+#ifndef NFD_TESTS_DAEMON_FW_TOPOLOGY_TESTER_HPP
+#define NFD_TESTS_DAEMON_FW_TOPOLOGY_TESTER_HPP
-#include <ndn-cxx/face.hpp>
#include "face/internal-transport.hpp"
#include "face/face.hpp"
#include "fw/strategy.hpp"
#include "install-strategy.hpp"
#include "tests/test-common.hpp"
+#include <ndn-cxx/face.hpp>
+
namespace nfd {
namespace fw {
namespace tests {
@@ -236,4 +237,4 @@
} // namespace fw
} // namespace nfd
-#endif // NFD_TESTS_NFD_FW_TOPOLOGY_TESTER_HPP
+#endif // NFD_TESTS_DAEMON_FW_TOPOLOGY_TESTER_HPP
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.hpp b/tests/daemon/mgmt/face-manager-command-fixture.hpp
index fcb89a4..8d66309 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.hpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.hpp
@@ -29,18 +29,17 @@
#include "mgmt/face-manager.hpp"
#include "fw/face-table.hpp"
+#include "tests/identity-management-fixture.hpp"
+
#include <ndn-cxx/mgmt/dispatcher.hpp>
#include <ndn-cxx/util/dummy-client-face.hpp>
-#include "tests/identity-management-fixture.hpp"
-
namespace nfd {
namespace tests {
class FaceManagerCommandNode
{
public:
- explicit
FaceManagerCommandNode(ndn::KeyChain& keyChain, uint16_t port);
~FaceManagerCommandNode();
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index ec37c57..c189894 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -24,11 +24,12 @@
*/
#include "mgmt/face-manager.hpp"
-#include "nfd-manager-common-fixture.hpp"
-#include "../face/dummy-face.hpp"
#include "face/tcp-factory.hpp"
#include "face/udp-factory.hpp"
+#include "nfd-manager-common-fixture.hpp"
+#include "../face/dummy-face.hpp"
+
#include <ndn-cxx/util/random.hpp>
#include <ndn-cxx/encoding/tlv.hpp>
#include <ndn-cxx/mgmt/nfd/channel-status.hpp>
@@ -37,8 +38,6 @@
namespace nfd {
namespace tests {
-BOOST_AUTO_TEST_SUITE(Mgmt)
-
class FaceManagerFixture : public NfdManagerCommonFixture
{
public:
@@ -112,6 +111,7 @@
FaceManager m_manager;
};
+BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_FIXTURE_TEST_SUITE(TestFaceManager, FaceManagerFixture)
BOOST_AUTO_TEST_SUITE(DestroyFace)
@@ -149,94 +149,7 @@
BOOST_AUTO_TEST_SUITE_END() // DestroyFace
-BOOST_AUTO_TEST_CASE(FaceEvents)
-{
- auto addedFace = addFace(); // trigger FACE_EVENT_CREATED notification
- BOOST_CHECK_NE(addedFace->getId(), -1);
- int64_t faceId = addedFace->getId();
-
- // check notification
- {
- Block payload;
- ndn::nfd::FaceEventNotification notification;
- BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
- BOOST_CHECK_NO_THROW(payload = m_responses[0].getContent().blockFromValue());
- BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
- BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
- BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_CREATED);
- BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
- BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
- BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
- BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
- BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
- BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
- }
-
- addedFace->close(); // trigger FaceDestroy FACE_EVENT_DESTROYED
- advanceClocks(time::milliseconds(1), 10);
-
- // check notification
- {
- Block payload;
- ndn::nfd::FaceEventNotification notification;
- BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
- BOOST_CHECK_NO_THROW(payload = m_responses[1].getContent().blockFromValue());
- BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
- BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
- BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_DESTROYED);
- BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
- BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
- BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
- BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
- BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
- BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
- }
- BOOST_CHECK_EQUAL(addedFace->getId(), face::INVALID_FACEID);
-}
-
-// @todo Refactor when ndn::nfd::FaceStatus implementes operator!= and operator<<
-class FaceStatus : public ndn::nfd::FaceStatus
-{
-public:
- FaceStatus(const ndn::nfd::FaceStatus& s)
- : ndn::nfd::FaceStatus(s)
- {
- }
-};
-
-bool
-operator!=(const FaceStatus& left, const FaceStatus& right)
-{
- return left.getRemoteUri() != right.getRemoteUri() ||
- left.getLocalUri() != right.getLocalUri() ||
- left.getFaceScope() != right.getFaceScope() ||
- left.getFacePersistency() != right.getFacePersistency() ||
- left.getLinkType() != right.getLinkType() ||
- left.getFlags() != right.getFlags() ||
- left.getNInInterests() != right.getNInInterests() ||
- left.getNInDatas() != right.getNInDatas() ||
- left.getNOutInterests() != right.getNOutInterests() ||
- left.getNOutDatas() != right.getNOutDatas() ||
- left.getNInBytes() != right.getNInBytes() ||
- left.getNOutBytes() != right.getNOutBytes();
-}
-
-std::ostream&
-operator<<(std::ostream &os, const FaceStatus& status)
-{
- os << "[" << status.getRemoteUri() << ", "
- << status.getLocalUri() << ", "
- << status.getFacePersistency() << ", "
- << status.getLinkType() << ", "
- << status.getFlags() << ", "
- << status.getNInInterests() << ", "
- << status.getNInDatas() << ", "
- << status.getNOutInterests() << ", "
- << status.getNOutDatas() << ", "
- << status.getNInBytes() << ", "
- << status.getNOutBytes() << "]";
- return os;
-}
+BOOST_AUTO_TEST_SUITE(Datasets)
BOOST_AUTO_TEST_CASE(FaceDataset)
{
@@ -325,6 +238,7 @@
class TestChannel : public Channel
{
public:
+ explicit
TestChannel(const std::string& uri)
{
setUri(FaceUri(uri));
@@ -339,12 +253,12 @@
ndn::nfd::FacePersistency persistency,
bool wantLocalFieldsEnabled,
const FaceCreatedCallback& onCreated,
- const FaceCreationFailedCallback& onConnectFailed) override
+ const FaceCreationFailedCallback& onConnectFailed) final
{
}
virtual std::vector<shared_ptr<const Channel>>
- getChannels() const override
+ getChannels() const final
{
return m_channels;
}
@@ -390,6 +304,57 @@
}
}
+BOOST_AUTO_TEST_SUITE_END() // Datasets
+
+BOOST_AUTO_TEST_SUITE(Notifications)
+
+BOOST_AUTO_TEST_CASE(FaceEventNotification)
+{
+ auto addedFace = addFace(); // trigger FACE_EVENT_CREATED notification
+ BOOST_CHECK_NE(addedFace->getId(), -1);
+ int64_t faceId = addedFace->getId();
+
+ // check notification
+ {
+ Block payload;
+ ndn::nfd::FaceEventNotification notification;
+ BOOST_REQUIRE_EQUAL(m_responses.size(), 1);
+ BOOST_CHECK_NO_THROW(payload = m_responses[0].getContent().blockFromValue());
+ BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
+ BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
+ BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_CREATED);
+ BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
+ BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
+ BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
+ BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
+ BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+ BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
+ }
+
+ addedFace->close(); // trigger FaceDestroy FACE_EVENT_DESTROYED
+ advanceClocks(time::milliseconds(1), 10);
+
+ // check notification
+ {
+ Block payload;
+ ndn::nfd::FaceEventNotification notification;
+ BOOST_REQUIRE_EQUAL(m_responses.size(), 2);
+ BOOST_CHECK_NO_THROW(payload = m_responses[1].getContent().blockFromValue());
+ BOOST_CHECK_EQUAL(payload.type(), ndn::tlv::nfd::FaceEventNotification);
+ BOOST_CHECK_NO_THROW(notification.wireDecode(payload));
+ BOOST_CHECK_EQUAL(notification.getKind(), ndn::nfd::FACE_EVENT_DESTROYED);
+ BOOST_CHECK_EQUAL(notification.getFaceId(), faceId);
+ BOOST_CHECK_EQUAL(notification.getRemoteUri(), addedFace->getRemoteUri().toString());
+ BOOST_CHECK_EQUAL(notification.getLocalUri(), addedFace->getLocalUri().toString());
+ BOOST_CHECK_EQUAL(notification.getFaceScope(), ndn::nfd::FACE_SCOPE_NON_LOCAL);
+ BOOST_CHECK_EQUAL(notification.getFacePersistency(), ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
+ BOOST_CHECK_EQUAL(notification.getLinkType(), ndn::nfd::LinkType::LINK_TYPE_POINT_TO_POINT);
+ }
+ BOOST_CHECK_EQUAL(addedFace->getId(), face::INVALID_FACEID);
+}
+
+BOOST_AUTO_TEST_SUITE_END() // Notifications
+
BOOST_AUTO_TEST_SUITE_END() // TestFaceManager
BOOST_AUTO_TEST_SUITE_END() // Mgmt
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 4bc642e..161e2f7 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -22,11 +22,13 @@
* You should have received a copy of the GNU General Public License along with
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include "mgmt/fib-manager.hpp"
+#include "table/fib-nexthop.hpp"
#include "nfd-manager-common-fixture.hpp"
-#include "table/fib-nexthop.hpp"
#include "../face/dummy-face.hpp"
+
#include <ndn-cxx/lp/tags.hpp>
#include <ndn-cxx/mgmt/nfd/fib-entry.hpp>
@@ -107,16 +109,16 @@
}
if (faceId != face::FACEID_NULL) {
- for (auto&& record : nextHops) {
+ for (const auto& record : nextHops) {
if (record.getFace().getId() == faceId) {
- return expectedCost != -1 && record.getCost() != static_cast<uint32_t>(expectedCost) ?
- CheckNextHopResult::WRONG_COST : CheckNextHopResult::OK;
+ if (expectedCost != -1 && record.getCost() != static_cast<uint32_t>(expectedCost))
+ return CheckNextHopResult::WRONG_COST;
+ else
+ return CheckNextHopResult::OK;
}
}
-
return CheckNextHopResult::NO_NEXTHOP;
}
-
return CheckNextHopResult::OK;
}
@@ -152,8 +154,8 @@
return os;
}
-BOOST_FIXTURE_TEST_SUITE(Mgmt, FibManagerFixture)
-BOOST_AUTO_TEST_SUITE(TestFibManager)
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_FIXTURE_TEST_SUITE(TestFibManager, FibManagerFixture)
BOOST_AUTO_TEST_SUITE(AddNextHop)
@@ -389,6 +391,8 @@
BOOST_AUTO_TEST_SUITE_END() // RemoveNextHop
+BOOST_AUTO_TEST_SUITE(List)
+
// @todo Remove when ndn::nfd::FibEntry implements operator!= and operator<<
class FibEntry : public ndn::nfd::FibEntry
{
@@ -408,17 +412,17 @@
return true;
}
- auto leftNextHops = left.getNextHopRecords();
- auto rightNextHops = right.getNextHopRecords();
+ const auto& leftNextHops = left.getNextHopRecords();
+ const auto& rightNextHops = right.getNextHopRecords();
if (leftNextHops.size() != rightNextHops.size()) {
return true;
}
- for (auto&& nexthop : leftNextHops) {
- auto hitEntry =
- std::find_if(rightNextHops.begin(), rightNextHops.end(), [&] (const ndn::nfd::NextHopRecord& record) {
- return nexthop.getCost() == record.getCost() && nexthop.getFaceId() == record.getFaceId();
- });
+ for (const auto& nexthop : leftNextHops) {
+ auto hitEntry = std::find_if(rightNextHops.begin(), rightNextHops.end(),
+ [&] (const ndn::nfd::NextHopRecord& record) {
+ return nexthop.getCost() == record.getCost() && nexthop.getFaceId() == record.getFaceId();
+ });
if (hitEntry == rightNextHops.end()) {
return true;
@@ -476,7 +480,7 @@
FibEntry record;
record.setPrefix(matchedEntry->getPrefix());
const auto& nextHops = matchedEntry->getNextHops();
- for (auto&& next : nextHops) {
+ for (const auto& next : nextHops) {
ndn::nfd::NextHopRecord nextHopRecord;
nextHopRecord.setFaceId(next.getFace().getId());
nextHopRecord.setCost(next.getCost());
@@ -486,11 +490,12 @@
}
BOOST_CHECK_EQUAL(actualPrefixes.size(), 0);
-
BOOST_CHECK_EQUAL_COLLECTIONS(receivedRecords.begin(), receivedRecords.end(),
expectedRecords.begin(), expectedRecords.end());
}
+BOOST_AUTO_TEST_SUITE_END() // List
+
BOOST_AUTO_TEST_SUITE_END() // TestFibManager
BOOST_AUTO_TEST_SUITE_END() // Mgmt
diff --git a/tests/daemon/mgmt/forwarder-status-manager.t.cpp b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
index ec73af1..b9cade3 100644
--- a/tests/daemon/mgmt/forwarder-status-manager.t.cpp
+++ b/tests/daemon/mgmt/forwarder-status-manager.t.cpp
@@ -31,8 +31,6 @@
namespace nfd {
namespace tests {
-BOOST_AUTO_TEST_SUITE(Mgmt)
-
class ForwarderStatusManagerFixture : public NfdManagerCommonFixture
{
protected:
@@ -48,9 +46,10 @@
time::system_clock::TimePoint startTime;
};
+BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_FIXTURE_TEST_SUITE(TestForwarderStatusManager, ForwarderStatusManagerFixture)
-BOOST_AUTO_TEST_CASE(GeneralStatus)
+BOOST_AUTO_TEST_CASE(GeneralStatusDataset)
{
// cause counters to be non-zero
this->advanceClocks(time::seconds(3600));
diff --git a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
index 65c5dcc..fb2dbc2 100644
--- a/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
+++ b/tests/daemon/mgmt/nfd-manager-common-fixture.hpp
@@ -23,10 +23,10 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
-#define NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#ifndef NFD_TESTS_DAEMON_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#define NFD_TESTS_DAEMON_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
-#include "manager-common-fixture.hpp"
+#include "tests/manager-common-fixture.hpp"
#include "fw/forwarder.hpp"
#include "mgmt/command-authenticator.hpp"
@@ -58,7 +58,7 @@
class CommandSuccess
{
public:
- ControlResponse
+ static ControlResponse
getExpected()
{
return ControlResponse()
@@ -71,7 +71,7 @@
class CommandFailure
{
public:
- ControlResponse
+ static ControlResponse
getExpected()
{
return ControlResponse()
@@ -83,4 +83,4 @@
} // namespace tests
} // namespace nfd
-#endif // NFD_TESTS_NFD_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
+#endif // NFD_TESTS_DAEMON_MGMT_NFD_MANAGER_COMMON_FIXTURE_HPP
diff --git a/tests/daemon/mgmt/strategy-choice-manager.t.cpp b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
index 1d8e135..56f22a7 100644
--- a/tests/daemon/mgmt/strategy-choice-manager.t.cpp
+++ b/tests/daemon/mgmt/strategy-choice-manager.t.cpp
@@ -24,14 +24,14 @@
*/
#include "mgmt/strategy-choice-manager.hpp"
-#include "nfd-manager-common-fixture.hpp"
#include "face/face.hpp"
#include "face/internal-face.hpp"
+#include "fw/strategy.hpp"
#include "table/name-tree.hpp"
#include "table/strategy-choice.hpp"
-#include "fw/strategy.hpp"
+#include "nfd-manager-common-fixture.hpp"
#include "tests/daemon/face/dummy-face.hpp"
#include "tests/daemon/fw/dummy-strategy.hpp"
#include "tests/daemon/fw/install-strategy.hpp"
@@ -77,8 +77,8 @@
StrategyChoiceManager m_manager;
};
-BOOST_FIXTURE_TEST_SUITE(Mgmt, StrategyChoiceManagerFixture)
-BOOST_AUTO_TEST_SUITE(TestStrategyChoiceManager)
+BOOST_AUTO_TEST_SUITE(Mgmt)
+BOOST_FIXTURE_TEST_SUITE(TestStrategyChoiceManager, StrategyChoiceManagerFixture)
BOOST_AUTO_TEST_CASE(SetStrategy)
{
@@ -191,11 +191,11 @@
return os;
}
-BOOST_AUTO_TEST_CASE(ListChoices)
+BOOST_AUTO_TEST_CASE(StrategyChoiceDataset)
{
size_t nPreInsertedStrategies = m_strategyChoice.size(); // the best-route strategy
std::set<Name> actualNames, actualStrategies;
- for (auto&& entry : m_strategyChoice) {
+ for (const auto& entry : m_strategyChoice) {
actualNames.insert(entry.getPrefix());
actualStrategies.insert(entry.getStrategyName());
}
@@ -239,7 +239,6 @@
BOOST_CHECK_EQUAL(actualNames.size(), 0);
BOOST_CHECK_EQUAL(actualStrategies.size(), 0);
-
BOOST_CHECK_EQUAL_COLLECTIONS(receivedRecords.begin(), receivedRecords.end(),
expectedRecords.begin(), expectedRecords.end());
}
diff --git a/tests/daemon/table/cs-policy-lru.t.cpp b/tests/daemon/table/cs-policy-lru.t.cpp
index a4e76a8..71f1764 100644
--- a/tests/daemon/table/cs-policy-lru.t.cpp
+++ b/tests/daemon/table/cs-policy-lru.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -35,9 +35,10 @@
using namespace nfd::tests;
-BOOST_AUTO_TEST_SUITE(CsLru)
+BOOST_AUTO_TEST_SUITE(Table)
+BOOST_AUTO_TEST_SUITE(TestCsLru)
-BOOST_FIXTURE_TEST_CASE(EvictOneLRU, UnitTestTimeFixture)
+BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
{
Cs cs(3);
cs.setPolicy(make_unique<LruPolicy>());
@@ -84,7 +85,8 @@
bind([] { BOOST_CHECK(true); }));
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestCsLru
+BOOST_AUTO_TEST_SUITE_END() // Table
} // namespace tests
} // namespace cs
diff --git a/tests/daemon/table/cs-policy-priority-fifo.t.cpp b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
index 8f365d4..01380ef 100644
--- a/tests/daemon/table/cs-policy-priority-fifo.t.cpp
+++ b/tests/daemon/table/cs-policy-priority-fifo.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -35,7 +35,8 @@
using namespace nfd::tests;
-BOOST_AUTO_TEST_SUITE(CsPriorityFifo)
+BOOST_AUTO_TEST_SUITE(Table)
+BOOST_AUTO_TEST_SUITE(TestCsPriorityFifo)
BOOST_FIXTURE_TEST_CASE(EvictOne, UnitTestTimeFixture)
{
@@ -140,7 +141,8 @@
bind([] { BOOST_CHECK(true); }));
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestCsPriorityFifo
+BOOST_AUTO_TEST_SUITE_END() // Table
} // namespace tests
} // namespace cs
diff --git a/tests/rib/auto-prefix-propagator.t.cpp b/tests/rib/auto-prefix-propagator.t.cpp
index ebdf94b..5077bab 100644
--- a/tests/rib/auto-prefix-propagator.t.cpp
+++ b/tests/rib/auto-prefix-propagator.t.cpp
@@ -25,8 +25,8 @@
#include "rib/auto-prefix-propagator.hpp"
-#include "tests/test-common.hpp"
#include "tests/identity-management-fixture.hpp"
+
#include <ndn-cxx/util/dummy-client-face.hpp>
namespace nfd {
@@ -35,13 +35,10 @@
using namespace nfd::tests;
-NFD_LOG_INIT("AutoPrefixPropagatorTest");
-
const Name TEST_LINK_LOCAL_NFD_PREFIX("/localhop/nfd");
const time::milliseconds TEST_PREFIX_PROPAGATION_TIMEOUT(1000);
-class AutoPrefixPropagatorFixture : public IdentityManagementFixture
- , public UnitTestTimeFixture
+class AutoPrefixPropagatorFixture : public IdentityManagementTimeFixture
{
public:
AutoPrefixPropagatorFixture()
@@ -66,7 +63,7 @@
insertEntryToRib(const Name& name, const uint64_t& faceId = 0)
{
if (m_rib.find(name) != m_rib.end()) {
- NFD_LOG_INFO("RIB entry already exists: " << name);
+ BOOST_TEST_MESSAGE("RIB entry already exists: " + name.toUri());
return false;
}
@@ -82,7 +79,7 @@
eraseEntryFromRib(const Name& name)
{
if (m_rib.find(name) == m_rib.end()) {
- NFD_LOG_INFO("RIB entry does not exist: " << name);
+ BOOST_TEST_MESSAGE("RIB entry does not exist: " + name.toUri());
return false;
}
@@ -215,8 +212,6 @@
return os;
}
-BOOST_AUTO_TEST_SUITE(Rib)
-
BOOST_FIXTURE_TEST_SUITE(TestAutoPrefixPropagator, AutoPrefixPropagatorFixture)
BOOST_AUTO_TEST_CASE(EnableDisable)
@@ -277,8 +272,6 @@
BOOST_CHECK_EQUAL(m_propagator.m_maxRetryWait, time::seconds(55));
}
-BOOST_AUTO_TEST_SUITE(Helpers)
-
BOOST_AUTO_TEST_CASE(GetPrefixPropagationParameters)
{
BOOST_REQUIRE(addIdentity("/test/A"));
@@ -365,8 +358,6 @@
BOOST_CHECK(m_entries.find("test/B/C") == m_entries.end());
}
-BOOST_AUTO_TEST_SUITE_END() // Helpers
-
BOOST_AUTO_TEST_SUITE(PropagateRevokeSemantics)
BOOST_AUTO_TEST_CASE(Basic)
@@ -684,7 +675,6 @@
BOOST_AUTO_TEST_SUITE_END() // PropagatedEntryStateChanges
BOOST_AUTO_TEST_SUITE_END() // TestAutoPrefixPropagator
-BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace tests
} // namespace rib
diff --git a/tests/rib/fib-updates-common.hpp b/tests/rib/fib-updates-common.hpp
index 1f293c6..df41c3e 100644
--- a/tests/rib/fib-updates-common.hpp
+++ b/tests/rib/fib-updates-common.hpp
@@ -33,8 +33,6 @@
namespace rib {
namespace tests {
-using namespace nfd::tests;
-
inline bool
compareNameFaceIdCostAction(const FibUpdate& lhs, const FibUpdate& rhs)
{
@@ -58,7 +56,7 @@
return false;
}
-class FibUpdatesFixture : public IdentityManagementFixture
+class FibUpdatesFixture : public nfd::tests::IdentityManagementFixture
{
public:
FibUpdatesFixture()
@@ -168,9 +166,9 @@
public:
ndn::util::DummyClientFace face;
ndn::nfd::Controller controller;
- rib::FibUpdater fibUpdater;
- rib::Rib rib;
+ Rib rib;
+ FibUpdater fibUpdater;
FibUpdater::FibUpdateList fibUpdates;
};
diff --git a/tests/rib/propagated-entry.t.cpp b/tests/rib/propagated-entry.t.cpp
index 8c8b1d2..fe43677 100644
--- a/tests/rib/propagated-entry.t.cpp
+++ b/tests/rib/propagated-entry.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,14 +24,13 @@
*/
#include "rib/propagated-entry.hpp"
+
#include "tests/test-common.hpp"
namespace nfd {
namespace rib {
namespace tests {
-BOOST_AUTO_TEST_SUITE(Rib)
-
BOOST_FIXTURE_TEST_SUITE(TestPropagatedEntry, nfd::tests::BaseFixture)
BOOST_AUTO_TEST_CASE(Identity)
@@ -81,7 +80,6 @@
}
BOOST_AUTO_TEST_SUITE_END() // TestPropagatedEntry
-BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace tests
} // namespace rib
diff --git a/tests/rib/rib-manager.t.cpp b/tests/rib/rib-manager.t.cpp
index 450016d..dfbeb29 100644
--- a/tests/rib/rib-manager.t.cpp
+++ b/tests/rib/rib-manager.t.cpp
@@ -265,7 +265,6 @@
return os;
}
-BOOST_AUTO_TEST_SUITE(Rib)
BOOST_AUTO_TEST_SUITE(TestRibManager)
class AddTopPrefixFixture : public RibManagerFixture
@@ -611,7 +610,6 @@
BOOST_AUTO_TEST_SUITE_END() // FaceMonitor
BOOST_AUTO_TEST_SUITE_END() // TestRibManager
-BOOST_AUTO_TEST_SUITE_END() // Rib
} // namespace tests
} // namespace rib
diff --git a/tests/rib/rib-update.cpp b/tests/rib/rib-update.t.cpp
similarity index 93%
rename from tests/rib/rib-update.cpp
rename to tests/rib/rib-update.t.cpp
index c7b1c6c..f40730f 100644
--- a/tests/rib/rib-update.cpp
+++ b/tests/rib/rib-update.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -23,17 +23,17 @@
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "tests/test-common.hpp"
-#include "rib-test-common.hpp"
-
#include "rib/rib-update.hpp"
#include "rib/rib-update-batch.hpp"
+#include "rib-test-common.hpp"
+#include "tests/test-common.hpp"
+
namespace nfd {
namespace rib {
namespace tests {
-BOOST_FIXTURE_TEST_SUITE(RibRibUpdate, nfd::tests::BaseFixture)
+BOOST_FIXTURE_TEST_SUITE(TestRibUpdate, nfd::tests::BaseFixture)
BOOST_AUTO_TEST_CASE(BatchBasic)
{
@@ -77,8 +77,7 @@
BOOST_CHECK(it == batch.end());
}
-
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRibUpdate
} // namespace tests
} // namespace rib
diff --git a/tests/rib/rib.t.cpp b/tests/rib/rib.t.cpp
index 91445c4..eed09f9 100644
--- a/tests/rib/rib.t.cpp
+++ b/tests/rib/rib.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2015, Regents of the University of California,
+ * Copyright (c) 2014-2016, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -24,10 +24,11 @@
*/
#include "rib/rib.hpp"
-#include <ndn-cxx/encoding/tlv-nfd.hpp>
#include "tests/test-common.hpp"
+#include <ndn-cxx/encoding/tlv-nfd.hpp>
+
namespace nfd {
namespace rib {
namespace tests {
@@ -294,7 +295,7 @@
BOOST_CHECK_EQUAL(rib.size(), 1);
}
-BOOST_AUTO_TEST_SUITE_END()
+BOOST_AUTO_TEST_SUITE_END() // TestRib
} // namespace tests
} // namespace rib