tests: remove obsolete makeLink helper function
This is a quick fix for a build error caused by the removal
of some deprecated functions from ndn-cxx.
Change-Id: I4df5bdd426743774b08f5966eed28a27f2af1279
Refs: #4055
diff --git a/tests/peek/ndnpeek.t.cpp b/tests/peek/ndnpeek.t.cpp
index a54426b..b44e7c5 100644
--- a/tests/peek/ndnpeek.t.cpp
+++ b/tests/peek/ndnpeek.t.cpp
@@ -20,6 +20,7 @@
#include "tools/peek/ndnpeek/ndnpeek.hpp"
#include "tests/test-common.hpp"
+
#include <ndn-cxx/util/dummy-client-face.hpp>
#include <boost/mpl/vector.hpp>
@@ -178,7 +179,6 @@
options.minSuffixComponents = 1;
options.maxSuffixComponents = 1;
options.interestLifetime = time::milliseconds(200);
- options.link = makeLink("/net/ndnsim", {{10, "/telia/terabits"}, {20, "/ucla/cs"}});
options.mustBeFresh = true;
options.wantRightmostChild = true;
initialize(options);
@@ -199,7 +199,7 @@
BOOST_CHECK_EQUAL(face.sentInterests.back().getMaxSuffixComponents(), 1);
BOOST_CHECK_EQUAL(face.sentInterests.back().getMinSuffixComponents(), 1);
BOOST_CHECK_EQUAL(face.sentInterests.back().getInterestLifetime(), time::milliseconds(200));
- BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint(), options.link->getDelegationList());
+ BOOST_CHECK_EQUAL(face.sentInterests.back().getForwardingHint().size(), 0);
BOOST_CHECK_EQUAL(face.sentInterests.back().getMustBeFresh(), true);
BOOST_CHECK_EQUAL(face.sentInterests.back().getChildSelector(), 1);
BOOST_CHECK(peek->getResultCode() == ResultCode::DATA);
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index 37d9d99..fe45dd9 100644
--- a/tests/test-common.cpp
+++ b/tests/test-common.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -98,18 +98,9 @@
fakeSignature.setValue(ndn::encoding::makeEmptyBlock(tlv::SignatureValue));
data.setSignature(fakeSignature);
data.wireEncode();
-
return data;
}
-shared_ptr<Link>
-makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations)
-{
- auto link = make_shared<Link>(name, delegations);
- signData(link);
- return link;
-}
-
lp::Nack
makeNack(const Interest& interest, lp::NackReason reason)
{
@@ -123,9 +114,7 @@
{
Interest interest(name);
interest.setNonce(nonce);
- lp::Nack nack(std::move(interest));
- nack.setReason(reason);
- return nack;
+ return makeNack(interest, reason);
}
} // namespace tests
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index f4c16f0..be0b63d 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -28,9 +28,8 @@
#include "boost-test.hpp"
-#include <ndn-cxx/interest.hpp>
#include <ndn-cxx/data.hpp>
-#include <ndn-cxx/link.hpp>
+#include <ndn-cxx/interest.hpp>
#include <ndn-cxx/lp/nack.hpp>
#include <ndn-cxx/util/time-unit-test-clock.hpp>
@@ -107,13 +106,6 @@
return data;
}
-/** \brief create a Link object with fake signature
- * \note Link may be modified afterwards without losing the fake signature.
- * If a real signature is desired, sign again with KeyChain.
- */
-shared_ptr<Link>
-makeLink(const Name& name, std::initializer_list<std::pair<uint32_t, Name>> delegations);
-
/** \brief create a Nack
* \param interest Interest
* \param reason Nack reason