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
This commit is contained in:
Davide Pesavento committed 2017-08-13 21:55:14 -04:00
1 parent a5b60cc017
commit bf28cd76ee
3 files changed
+6 -25

No files matched your search

+2 -2
View File
@@ -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 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(Selectors, OutputCheck, OutputChecks)
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_AUTO_TEST_CASE_TEMPLATE(Selectors, OutputCheck, OutputChecks)
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);
+2 -13
View File
@@ -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 @@ signData(Data& data)
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 @@ makeNack(const Name& name, uint32_t nonce, lp::NackReason reason)
{
Interest interest(name);
interest.setNonce(nonce);
lp::Nack nack(std::move(interest));
nack.setReason(reason);
return nack;
return makeNack(interest, reason);
}
} // namespace tests
+2 -10
View File
@@ -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 @@ signData(shared_ptr<Data> data)
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