Remove previously deprecated headers, methods, and constants
Change-Id: I3e809e25c8f2bc2ae0f027413d9e0161245353c6
Refs: #3988
diff --git a/tests/unit-tests/data.t.cpp b/tests/unit-tests/data.t.cpp
index 0cf8aae..bdf5f18 100644
--- a/tests/unit-tests/data.t.cpp
+++ b/tests/unit-tests/data.t.cpp
@@ -230,7 +230,7 @@
BOOST_REQUIRE_EQUAL(std::string(reinterpret_cast<const char*>(d.getContent().value()),
d.getContent().value_size()), "SUCCESS!");
- BOOST_REQUIRE_EQUAL(d.getSignature().getType(), static_cast<uint32_t>(Signature::Sha256WithRsa));
+ BOOST_REQUIRE_EQUAL(d.getSignature().getType(), tlv::SignatureSha256WithRsa);
ndn::Block block = d.getSignature().getInfo();
block.parse();
KeyLocator keyLocator;
@@ -261,7 +261,7 @@
Block signatureInfo(tlv::SignatureInfo);
// SignatureType
{
- signatureInfo.push_back(makeNonNegativeIntegerBlock(tlv::SignatureType, Signature::Sha256WithRsa));
+ signatureInfo.push_back(makeNonNegativeIntegerBlock(tlv::SignatureType, tlv::SignatureSha256WithRsa));
}
// KeyLocator
{
@@ -280,7 +280,7 @@
RSASS<PKCS1v15, SHA256>::Signer signer(privateKey_);
- PK_MessageAccumulator *hash = signer.NewSignatureAccumulator(rng_);
+ PK_MessageAccumulator* hash = signer.NewSignatureAccumulator(rng_);
hash->Update(d.getName(). wireEncode().wire(), d.getName(). wireEncode().size());
hash->Update(d.getMetaInfo().wireEncode().wire(), d.getMetaInfo().wireEncode().size());
hash->Update(d.getContent(). wire(), d.getContent(). size());
diff --git a/tests/unit-tests/face.t.cpp b/tests/unit-tests/face.t.cpp
index ebbede6..3f73f8a 100644
--- a/tests/unit-tests/face.t.cpp
+++ b/tests/unit-tests/face.t.cpp
@@ -137,43 +137,6 @@
} while (false));
}
-BOOST_AUTO_TEST_CASE(DeprecatedExpressInterestData)
-{
- size_t nData = 0;
- face.expressInterest(Interest("/Hello/World", time::milliseconds(50)),
- [&] (const Interest& i, Data& d) {
- BOOST_CHECK(i.getName().isPrefixOf(d.getName()));
- ++nData;
- },
- bind([] { BOOST_FAIL("Unexpected timeout"); }));
-
- advanceClocks(time::milliseconds(40));
-
- face.receive(*makeData("/Bye/World/a"));
- face.receive(*makeData("/Hello/World/a"));
-
- advanceClocks(time::milliseconds(50), 2);
-
- BOOST_CHECK_EQUAL(nData, 1);
- BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
- BOOST_CHECK_EQUAL(face.sentData.size(), 0);
-
- face.expressInterest(Interest("/Hello/World/a", time::milliseconds(50)),
- [&] (const Interest& i, Data& d) {
- BOOST_CHECK(i.getName().isPrefixOf(d.getName()));
- ++nData;
- },
- bind([] { BOOST_FAIL("Unexpected timeout"); }));
- advanceClocks(time::milliseconds(40));
- face.receive(*makeData("/Hello/World/a/1/xxxxx"));
-
- advanceClocks(time::milliseconds(50), 2);
-
- BOOST_CHECK_EQUAL(nData, 2);
- BOOST_CHECK_EQUAL(face.sentInterests.size(), 2);
- BOOST_CHECK_EQUAL(face.sentData.size(), 0);
-}
-
BOOST_AUTO_TEST_CASE(ExpressInterestTimeout)
{
size_t nTimeouts = 0;
@@ -206,20 +169,6 @@
} while (false));
}
-BOOST_AUTO_TEST_CASE(DeprecatedExpressInterestTimeout)
-{
- size_t nTimeouts = 0;
- face.expressInterest(Interest("/Hello/World", time::milliseconds(50)),
- bind([] { BOOST_FAIL("Unexpected data"); }),
- bind([&nTimeouts] { ++nTimeouts; }));
-
- advanceClocks(time::milliseconds(200), 5);
-
- BOOST_CHECK_EQUAL(nTimeouts, 1);
- BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
- BOOST_CHECK_EQUAL(face.sentData.size(), 0);
-}
-
BOOST_AUTO_TEST_CASE(ExpressInterestNack)
{
size_t nNacks = 0;
@@ -292,22 +241,6 @@
} while (false));
}
-BOOST_AUTO_TEST_CASE(DeprecatedExpressInterestNack)
-{
- size_t nTimeouts = 0;
- face.expressInterest(Interest("/Hello/World", time::milliseconds(50)),
- bind([] { BOOST_FAIL("Unexpected data"); }),
- bind([&nTimeouts] { ++nTimeouts; }));
- advanceClocks(time::milliseconds(1));
-
- face.receive(makeNack(face.sentInterests.at(0), lp::NackReason::CONGESTION));
- advanceClocks(time::milliseconds(1));
-
- BOOST_CHECK_EQUAL(nTimeouts, 1);
- BOOST_CHECK_EQUAL(face.sentInterests.size(), 1);
- BOOST_CHECK_EQUAL(face.sentData.size(), 0);
-}
-
BOOST_AUTO_TEST_CASE(RemovePendingInterest)
{
const PendingInterestId* interestId =
@@ -356,7 +289,7 @@
{
DummyClientFace face2(io, m_keyChain);
face2.expressInterest(Interest("/Hello/World", time::milliseconds(50)),
- bind([]{}), bind([]{}));
+ nullptr, nullptr, nullptr);
advanceClocks(time::milliseconds(50), 2);
}
diff --git a/tests/unit-tests/mgmt/nfd/control-command.t.cpp b/tests/unit-tests/mgmt/nfd/control-command.t.cpp
index 72fe613..f204197 100644
--- a/tests/unit-tests/mgmt/nfd/control-command.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/control-command.t.cpp
@@ -181,54 +181,6 @@
BOOST_CHECK(Name("ndn:/PREFIX/faces/destroy").isPrefixOf(n3));
}
-BOOST_AUTO_TEST_CASE(FaceEnableLocalControl)
-{
- FaceEnableLocalControlCommand command;
-
- ControlParameters p1;
- p1.setLocalControlFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
- BOOST_CHECK_NO_THROW(command.validateRequest(p1));
- BOOST_CHECK_NO_THROW(command.validateResponse(p1));
- Name n1;
- BOOST_CHECK_NO_THROW(n1 = command.getRequestName("/PREFIX", p1));
- BOOST_CHECK(Name("ndn:/PREFIX/faces/enable-local-control").isPrefixOf(n1));
-
- ControlParameters p2;
- p2.setLocalControlFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID)
- .setFaceId(9);
- BOOST_CHECK_THROW(command.validateRequest(p2), ControlCommand::ArgumentError);
- BOOST_CHECK_THROW(command.validateResponse(p2), ControlCommand::ArgumentError);
-
- ControlParameters p3;
- p3.setLocalControlFeature(static_cast<LocalControlFeature>(666));
- BOOST_CHECK_THROW(command.validateRequest(p3), ControlCommand::ArgumentError);
- BOOST_CHECK_THROW(command.validateResponse(p3), ControlCommand::ArgumentError);
-}
-
-BOOST_AUTO_TEST_CASE(FaceDisableLocalControl)
-{
- FaceDisableLocalControlCommand command;
-
- ControlParameters p1;
- p1.setLocalControlFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
- BOOST_CHECK_NO_THROW(command.validateRequest(p1));
- BOOST_CHECK_NO_THROW(command.validateResponse(p1));
- Name n1;
- BOOST_CHECK_NO_THROW(n1 = command.getRequestName("/PREFIX", p1));
- BOOST_CHECK(Name("ndn:/PREFIX/faces/disable-local-control").isPrefixOf(n1));
-
- ControlParameters p2;
- p2.setLocalControlFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID)
- .setFaceId(9);
- BOOST_CHECK_THROW(command.validateRequest(p2), ControlCommand::ArgumentError);
- BOOST_CHECK_THROW(command.validateResponse(p2), ControlCommand::ArgumentError);
-
- ControlParameters p3;
- p3.setLocalControlFeature(static_cast<LocalControlFeature>(666));
- BOOST_CHECK_THROW(command.validateRequest(p3), ControlCommand::ArgumentError);
- BOOST_CHECK_THROW(command.validateResponse(p3), ControlCommand::ArgumentError);
-}
-
BOOST_AUTO_TEST_CASE(FibAddNextHop)
{
FibAddNextHopCommand command;
diff --git a/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp b/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp
index 30db9ed..8f8f98a 100644
--- a/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp
+++ b/tests/unit-tests/mgmt/nfd/control-parameters.t.cpp
@@ -50,35 +50,12 @@
BOOST_CHECK_EQUAL(decoded.hasName(), false);
BOOST_CHECK_EQUAL(decoded.hasFaceId(), false);
- BOOST_CHECK_EQUAL(decoded.hasLocalControlFeature(), false);
BOOST_CHECK_EQUAL(decoded.hasOrigin(), false);
BOOST_CHECK_EQUAL(decoded.hasCost(), false);
BOOST_CHECK_EQUAL(decoded.hasStrategy(), false);
BOOST_CHECK_EQUAL(decoded.hasExpirationPeriod(), false);
}
-BOOST_AUTO_TEST_CASE(FaceLocalControlOptions)
-{
- ControlParameters parameters;
- parameters.setLocalControlFeature(LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
-
- Block wire = parameters.wireEncode();
-
- ControlParameters decoded(wire);
- BOOST_CHECK_EQUAL(decoded.getLocalControlFeature(), LOCAL_CONTROL_FEATURE_INCOMING_FACE_ID);
-
- BOOST_CHECK_EQUAL(decoded.hasName(), false);
- BOOST_CHECK_EQUAL(decoded.hasFaceId(), false);
- BOOST_CHECK_EQUAL(decoded.hasUri(), false);
- BOOST_CHECK_EQUAL(decoded.hasLocalUri(), false);
- BOOST_CHECK_EQUAL(decoded.hasOrigin(), false);
- BOOST_CHECK_EQUAL(decoded.hasCost(), false);
- BOOST_CHECK_EQUAL(decoded.hasFlags(), false);
- BOOST_CHECK_EQUAL(decoded.hasStrategy(), false);
- BOOST_CHECK_EQUAL(decoded.hasExpirationPeriod(), false);
- BOOST_CHECK_EQUAL(decoded.hasFacePersistency(), false);
-}
-
BOOST_AUTO_TEST_CASE(FibOptions)
{
ControlParameters parameters;
@@ -95,7 +72,6 @@
BOOST_CHECK_EQUAL(decoded.hasUri(), false);
BOOST_CHECK_EQUAL(decoded.hasLocalUri(), false);
- BOOST_CHECK_EQUAL(decoded.hasLocalControlFeature(), false);
BOOST_CHECK_EQUAL(decoded.hasOrigin(), false);
BOOST_CHECK_EQUAL(decoded.hasFlags(), false);
BOOST_CHECK_EQUAL(decoded.hasMask(), false);
@@ -119,7 +95,6 @@
BOOST_CHECK_EQUAL(decoded.hasFaceId(), false);
BOOST_CHECK_EQUAL(decoded.hasUri(), false);
BOOST_CHECK_EQUAL(decoded.hasLocalUri(), false);
- BOOST_CHECK_EQUAL(decoded.hasLocalControlFeature(), false);
BOOST_CHECK_EQUAL(decoded.hasOrigin(), false);
BOOST_CHECK_EQUAL(decoded.hasCost(), false);
BOOST_CHECK_EQUAL(decoded.hasFlags(), false);
@@ -150,7 +125,6 @@
BOOST_CHECK_EQUAL(decoded.hasUri(), false);
BOOST_CHECK_EQUAL(decoded.hasLocalUri(), false);
- BOOST_CHECK_EQUAL(decoded.hasLocalControlFeature(), false);
BOOST_CHECK_EQUAL(decoded.hasMask(), false);
BOOST_CHECK_EQUAL(decoded.hasStrategy(), false);
BOOST_CHECK_EQUAL(decoded.hasFacePersistency(), false);