table: pit::FaceRecord stores Face& instead of shared_ptr
refs #3164
Change-Id: Ib23ab2341a37213fee791f2070f13b76da851d53
diff --git a/tests/daemon/fw/pit-algorithm.t.cpp b/tests/daemon/fw/pit-algorithm.t.cpp
index cf3eea0..0589e0d 100644
--- a/tests/daemon/fw/pit-algorithm.t.cpp
+++ b/tests/daemon/fw/pit-algorithm.t.cpp
@@ -62,7 +62,7 @@
shared_ptr<Interest> interest = makeInterest("ndn:/ieWRzDsCu");
pit::Entry entry(*interest);
- entry.insertOrUpdateInRecord(nonLocalFace1, *interest);
+ entry.insertOrUpdateInRecord(*nonLocalFace1, *interest);
BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), false);
BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
}
@@ -72,7 +72,7 @@
shared_ptr<Interest> interest = makeInterest("ndn:/localhost/5n1LzIt3");
pit::Entry entry(*interest);
- entry.insertOrUpdateInRecord(localFace3, *interest);
+ entry.insertOrUpdateInRecord(*localFace3, *interest);
BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), true);
BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
}
@@ -82,7 +82,7 @@
shared_ptr<Interest> interest = makeInterest("ndn:/localhop/YcIKWCRYJ");
pit::Entry entry(*interest);
- entry.insertOrUpdateInRecord(localFace3, *interest);
+ entry.insertOrUpdateInRecord(*localFace3, *interest);
BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), false);
BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
}
@@ -92,7 +92,7 @@
shared_ptr<Interest> interest = makeInterest("ndn:/localhop/x5uFr5IpqY");
pit::Entry entry(*interest);
- entry.insertOrUpdateInRecord(nonLocalFace1, *interest);
+ entry.insertOrUpdateInRecord(*nonLocalFace1, *interest);
BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), true);
BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
}
@@ -102,8 +102,8 @@
shared_ptr<Interest> interest = makeInterest("ndn:/localhop/gNn2MJAXt");
pit::Entry entry(*interest);
- entry.insertOrUpdateInRecord(nonLocalFace1, *interest);
- entry.insertOrUpdateInRecord(localFace3, *interest);
+ entry.insertOrUpdateInRecord(*nonLocalFace1, *interest);
+ entry.insertOrUpdateInRecord(*localFace3, *interest);
BOOST_CHECK_EQUAL(violatesScope(entry, *nonLocalFace2), false);
BOOST_CHECK_EQUAL(violatesScope(entry, *localFace4), false);
}
@@ -118,15 +118,15 @@
auto face1 = make_shared<DummyFace>();
auto face2 = make_shared<DummyFace>();
- entry.insertOrUpdateInRecord(face1, *interest);
+ entry.insertOrUpdateInRecord(*face1, *interest);
BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), false);
BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
- entry.insertOrUpdateInRecord(face2, *interest);
+ entry.insertOrUpdateInRecord(*face2, *interest);
BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), true);
BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
- entry.insertOrUpdateOutRecord(face1, *interest);
+ entry.insertOrUpdateOutRecord(*face1, *interest);
BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face1), false);
BOOST_CHECK_EQUAL(canForwardToLegacy(entry, *face2), true);
}
@@ -146,22 +146,22 @@
BOOST_CHECK_EQUAL(findDuplicateNonce(entry0, 19004, *face2), DUPLICATE_NONCE_NONE);
pit::Entry entry1(*interest);
- entry1.insertOrUpdateInRecord(face1, *interest);
+ entry1.insertOrUpdateInRecord(*face1, *interest);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 25559, *face1), DUPLICATE_NONCE_IN_SAME);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 25559, *face2), DUPLICATE_NONCE_IN_OTHER);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 19004, *face1), DUPLICATE_NONCE_NONE);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry1, 19004, *face2), DUPLICATE_NONCE_NONE);
pit::Entry entry2(*interest);
- entry2.insertOrUpdateOutRecord(face1, *interest);
+ entry2.insertOrUpdateOutRecord(*face1, *interest);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 25559, *face1), DUPLICATE_NONCE_OUT_SAME);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 25559, *face2), DUPLICATE_NONCE_OUT_OTHER);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 19004, *face1), DUPLICATE_NONCE_NONE);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry2, 19004, *face2), DUPLICATE_NONCE_NONE);
pit::Entry entry3(*interest);
- entry3.insertOrUpdateInRecord(face1, *interest);
- entry3.insertOrUpdateOutRecord(face1, *interest);
+ entry3.insertOrUpdateInRecord(*face1, *interest);
+ entry3.insertOrUpdateOutRecord(*face1, *interest);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 25559, *face1),
DUPLICATE_NONCE_IN_SAME | DUPLICATE_NONCE_OUT_SAME);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 25559, *face2),
@@ -170,8 +170,8 @@
BOOST_CHECK_EQUAL(findDuplicateNonce(entry3, 19004, *face2), DUPLICATE_NONCE_NONE);
pit::Entry entry4(*interest);
- entry4.insertOrUpdateInRecord(face1, *interest);
- entry4.insertOrUpdateInRecord(face2, *interest);
+ entry4.insertOrUpdateInRecord(*face1, *interest);
+ entry4.insertOrUpdateInRecord(*face2, *interest);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 25559, *face1),
DUPLICATE_NONCE_IN_SAME | DUPLICATE_NONCE_IN_OTHER);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 25559, *face2),
@@ -180,8 +180,8 @@
BOOST_CHECK_EQUAL(findDuplicateNonce(entry4, 19004, *face2), DUPLICATE_NONCE_NONE);
pit::Entry entry5(*interest);
- entry5.insertOrUpdateOutRecord(face1, *interest);
- entry5.insertOrUpdateOutRecord(face2, *interest);
+ entry5.insertOrUpdateOutRecord(*face1, *interest);
+ entry5.insertOrUpdateOutRecord(*face2, *interest);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 25559, *face1),
DUPLICATE_NONCE_OUT_SAME | DUPLICATE_NONCE_OUT_OTHER);
BOOST_CHECK_EQUAL(findDuplicateNonce(entry5, 25559, *face2),
@@ -203,13 +203,13 @@
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
// Interest-Data
- entry.insertOrUpdateOutRecord(face1, *interest);
+ entry.insertOrUpdateOutRecord(*face1, *interest);
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
entry.deleteOutRecord(*face1);
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
// Interest-Nack
- entry.insertOrUpdateOutRecord(face2, *interest);
+ entry.insertOrUpdateOutRecord(*face2, *interest);
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
pit::OutRecordCollection::iterator outR = entry.getOutRecord(*face2);
BOOST_REQUIRE(outR != entry.out_end());
@@ -219,7 +219,7 @@
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);
// Interest-timeout
- entry.insertOrUpdateOutRecord(face3, *interest);
+ entry.insertOrUpdateOutRecord(*face3, *interest);
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), true);
this->advanceClocks(ndn::DEFAULT_INTEREST_LIFETIME, 2);
BOOST_CHECK_EQUAL(hasPendingOutRecords(entry), false);