Move BOOST_CONCEPT_ASSERT to unit tests where possible
Change-Id: I0c6ae494eb7be4ab2ff422ba6d866ead9e75f4eb
diff --git a/tests/unit/mgmt/nfd/channel-status.t.cpp b/tests/unit/mgmt/nfd/channel-status.t.cpp
index dc29def..8036d0d 100644
--- a/tests/unit/mgmt/nfd/channel-status.t.cpp
+++ b/tests/unit/mgmt/nfd/channel-status.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/channel-status.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -29,6 +30,8 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<ChannelStatus>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestChannelStatus)
diff --git a/tests/unit/mgmt/nfd/control-parameters.t.cpp b/tests/unit/mgmt/nfd/control-parameters.t.cpp
index b098529..4866620 100644
--- a/tests/unit/mgmt/nfd/control-parameters.t.cpp
+++ b/tests/unit/mgmt/nfd/control-parameters.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/control-parameters.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -27,6 +28,11 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((WireEncodable<ControlParameters>));
+BOOST_CONCEPT_ASSERT((WireDecodable<ControlParameters>));
+static_assert(std::is_convertible_v<ControlParameters::Error*, tlv::Error*>,
+ "ControlParameters::Error must inherit from tlv::Error");
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestControlParameters)
diff --git a/tests/unit/mgmt/nfd/cs-info.t.cpp b/tests/unit/mgmt/nfd/cs-info.t.cpp
index 3bc5f7b..70d8a20 100644
--- a/tests/unit/mgmt/nfd/cs-info.t.cpp
+++ b/tests/unit/mgmt/nfd/cs-info.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,14 +20,18 @@
*/
#include "ndn-cxx/mgmt/nfd/cs-info.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
+
#include <boost/lexical_cast.hpp>
namespace ndn {
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<CsInfo>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestCsInfo)
diff --git a/tests/unit/mgmt/nfd/face-event-notification.t.cpp b/tests/unit/mgmt/nfd/face-event-notification.t.cpp
index f1dfc38..97b3000 100644
--- a/tests/unit/mgmt/nfd/face-event-notification.t.cpp
+++ b/tests/unit/mgmt/nfd/face-event-notification.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/face-event-notification.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -29,6 +30,8 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((NotificationStreamItem<FaceEventNotification>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestFaceEventNotification)
diff --git a/tests/unit/mgmt/nfd/face-query-filter.t.cpp b/tests/unit/mgmt/nfd/face-query-filter.t.cpp
index e46d6c1..1f83f82 100644
--- a/tests/unit/mgmt/nfd/face-query-filter.t.cpp
+++ b/tests/unit/mgmt/nfd/face-query-filter.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/face-query-filter.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -29,6 +30,12 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((boost::EqualityComparable<FaceQueryFilter>));
+BOOST_CONCEPT_ASSERT((WireEncodable<FaceQueryFilter>));
+BOOST_CONCEPT_ASSERT((WireDecodable<FaceQueryFilter>));
+static_assert(std::is_convertible_v<FaceQueryFilter::Error*, tlv::Error*>,
+ "FaceQueryFilter::Error must inherit from tlv::Error");
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestFaceQueryFilter)
diff --git a/tests/unit/mgmt/nfd/face-status.t.cpp b/tests/unit/mgmt/nfd/face-status.t.cpp
index 405bf2c..275acf2 100644
--- a/tests/unit/mgmt/nfd/face-status.t.cpp
+++ b/tests/unit/mgmt/nfd/face-status.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/face-status.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -29,6 +30,8 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<FaceStatus>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestFaceStatus)
diff --git a/tests/unit/mgmt/nfd/fib-entry.t.cpp b/tests/unit/mgmt/nfd/fib-entry.t.cpp
index ff5d21b..81f94e5 100644
--- a/tests/unit/mgmt/nfd/fib-entry.t.cpp
+++ b/tests/unit/mgmt/nfd/fib-entry.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2019 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,14 +20,19 @@
*/
#include "ndn-cxx/mgmt/nfd/fib-entry.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
+
#include <boost/lexical_cast.hpp>
namespace ndn {
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<NextHopRecord>));
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<FibEntry>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestFibEntry)
diff --git a/tests/unit/mgmt/nfd/forwarder-status.t.cpp b/tests/unit/mgmt/nfd/forwarder-status.t.cpp
index b4eb339..6492e55 100644
--- a/tests/unit/mgmt/nfd/forwarder-status.t.cpp
+++ b/tests/unit/mgmt/nfd/forwarder-status.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/forwarder-status.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -29,6 +30,8 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<ForwarderStatus>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestForwarderStatus)
diff --git a/tests/unit/mgmt/nfd/rib-entry.t.cpp b/tests/unit/mgmt/nfd/rib-entry.t.cpp
index 950a196..3479c01 100644
--- a/tests/unit/mgmt/nfd/rib-entry.t.cpp
+++ b/tests/unit/mgmt/nfd/rib-entry.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2018 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,14 +20,19 @@
*/
#include "ndn-cxx/mgmt/nfd/rib-entry.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
+
#include <boost/lexical_cast.hpp>
namespace ndn {
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<Route>));
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<RibEntry>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestRibEntry)
diff --git a/tests/unit/mgmt/nfd/strategy-choice.t.cpp b/tests/unit/mgmt/nfd/strategy-choice.t.cpp
index 94c30e8..92f271c 100644
--- a/tests/unit/mgmt/nfd/strategy-choice.t.cpp
+++ b/tests/unit/mgmt/nfd/strategy-choice.t.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2013-2022 Regents of the University of California.
+ * Copyright (c) 2013-2023 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -20,6 +20,7 @@
*/
#include "ndn-cxx/mgmt/nfd/strategy-choice.hpp"
+#include "ndn-cxx/util/concepts.hpp"
#include "tests/boost-test.hpp"
@@ -29,6 +30,8 @@
namespace nfd {
namespace tests {
+BOOST_CONCEPT_ASSERT((StatusDatasetItem<StrategyChoice>));
+
BOOST_AUTO_TEST_SUITE(Mgmt)
BOOST_AUTO_TEST_SUITE(Nfd)
BOOST_AUTO_TEST_SUITE(TestStrategyChoice)