ping: set CanBePrefix=false
This commit also sets CanBePrefix in ndndump and ndnpoke tests.
refs #4581
Change-Id: Ie91839426acc02f1879495312ad7ef131e8dac57
diff --git a/tests/test-common.cpp b/tests/test-common.cpp
index fe45dd9..f180a5e 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-2017, Regents of the University of California,
+/*
+ * Copyright (c) 2014-2018, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -75,9 +75,10 @@
}
shared_ptr<Interest>
-makeInterest(const Name& name, uint32_t nonce)
+makeInterest(const Name& name, bool canBePrefix, time::milliseconds lifetime, uint32_t nonce)
{
- auto interest = make_shared<Interest>(name);
+ auto interest = make_shared<Interest>(name, lifetime);
+ interest->setCanBePrefix(canBePrefix);
if (nonce != 0) {
interest->setNonce(nonce);
}
@@ -109,13 +110,5 @@
return nack;
}
-lp::Nack
-makeNack(const Name& name, uint32_t nonce, lp::NackReason reason)
-{
- Interest interest(name);
- interest.setNonce(nonce);
- return makeNack(interest, reason);
-}
-
} // namespace tests
} // namespace ndn