Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
Junxiao Shi | 4370fde | 2016-02-24 12:20:46 -0700 | [diff] [blame] | 3 | * Copyright (c) 2014-2016, Regents of the University of California, |
Alexander Afanasyev | 319f2c8 | 2015-01-07 14:56:53 -0800 | [diff] [blame] | 4 | * Arizona Board of Regents, |
| 5 | * Colorado State University, |
| 6 | * University Pierre & Marie Curie, Sorbonne University, |
| 7 | * Washington University in St. Louis, |
| 8 | * Beijing Institute of Technology, |
| 9 | * The University of Memphis. |
Alexander Afanasyev | 9bcbc7c | 2014-04-06 19:37:37 -0700 | [diff] [blame] | 10 | * |
| 11 | * This file is part of NFD (Named Data Networking Forwarding Daemon). |
| 12 | * See AUTHORS.md for complete list of NFD authors and contributors. |
| 13 | * |
| 14 | * NFD is free software: you can redistribute it and/or modify it under the terms |
| 15 | * of the GNU General Public License as published by the Free Software Foundation, |
| 16 | * either version 3 of the License, or (at your option) any later version. |
| 17 | * |
| 18 | * NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 19 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 20 | * PURPOSE. See the GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License along with |
| 23 | * NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
Alexander Afanasyev | c026d25 | 2014-06-16 11:14:15 -0700 | [diff] [blame] | 24 | */ |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 25 | |
| 26 | #include "table/pit.hpp" |
Alexander Afanasyev | 613e2a9 | 2014-04-15 13:36:58 -0700 | [diff] [blame] | 27 | #include "tests/daemon/face/dummy-face.hpp" |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 28 | |
Junxiao Shi | d9ee45c | 2014-02-27 15:38:11 -0700 | [diff] [blame] | 29 | #include "tests/test-common.hpp" |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 30 | |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 31 | namespace nfd { |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame] | 32 | namespace pit { |
Junxiao Shi | d9ee45c | 2014-02-27 15:38:11 -0700 | [diff] [blame] | 33 | namespace tests { |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 34 | |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame] | 35 | using namespace nfd::tests; |
| 36 | |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 37 | BOOST_AUTO_TEST_SUITE(Table) |
| 38 | BOOST_FIXTURE_TEST_SUITE(TestPit, BaseFixture) |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 39 | |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 40 | BOOST_AUTO_TEST_SUITE(PitEntry) |
| 41 | |
| 42 | BOOST_AUTO_TEST_CASE(InOutRecords) |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 43 | { |
Junxiao Shi | 8c8d218 | 2014-01-30 22:33:00 -0700 | [diff] [blame] | 44 | shared_ptr<Face> face1 = make_shared<DummyFace>(); |
| 45 | shared_ptr<Face> face2 = make_shared<DummyFace>(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 46 | Name name("ndn:/KuYfjtRq"); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 47 | shared_ptr<Interest> interest = makeInterest(name); |
| 48 | shared_ptr<Interest> interest1 = makeInterest(name); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 49 | interest1->setInterestLifetime(time::milliseconds(2528)); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 50 | interest1->setNonce(25559); |
| 51 | shared_ptr<Interest> interest2 = makeInterest(name); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 52 | interest2->setInterestLifetime(time::milliseconds(6464)); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 53 | interest2->setNonce(19004); |
| 54 | shared_ptr<Interest> interest3 = makeInterest(name); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 55 | interest3->setInterestLifetime(time::milliseconds(3585)); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 56 | interest3->setNonce(24216); |
| 57 | shared_ptr<Interest> interest4 = makeInterest(name); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 58 | interest4->setInterestLifetime(time::milliseconds(8795)); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 59 | interest4->setNonce(17365); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 60 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 61 | Entry entry(*interest); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 62 | |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 63 | BOOST_CHECK_EQUAL(entry.getInterest().getName(), name); |
| 64 | BOOST_CHECK_EQUAL(entry.getName(), name); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 65 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 66 | const InRecordCollection& inRecords1 = entry.getInRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 67 | BOOST_CHECK_EQUAL(inRecords1.size(), 0); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 68 | const OutRecordCollection& outRecords1 = entry.getOutRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 69 | BOOST_CHECK_EQUAL(outRecords1.size(), 0); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 70 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 71 | // insert in-record |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 72 | time::steady_clock::TimePoint before1 = time::steady_clock::now(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 73 | InRecordCollection::iterator in1 = entry.insertOrUpdateInRecord(face1, *interest1); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 74 | time::steady_clock::TimePoint after1 = time::steady_clock::now(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 75 | const InRecordCollection& inRecords2 = entry.getInRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 76 | BOOST_CHECK_EQUAL(inRecords2.size(), 1); |
| 77 | BOOST_CHECK(in1 == inRecords2.begin()); |
| 78 | BOOST_CHECK_EQUAL(in1->getFace(), face1); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 79 | BOOST_CHECK_EQUAL(in1->getLastNonce(), interest1->getNonce()); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 80 | BOOST_CHECK_GE(in1->getLastRenewed(), before1); |
| 81 | BOOST_CHECK_LE(in1->getLastRenewed(), after1); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 82 | BOOST_CHECK_LE(in1->getExpiry() - in1->getLastRenewed() |
| 83 | - interest1->getInterestLifetime(), |
| 84 | (after1 - before1)); |
Junxiao Shi | b2bcbcd | 2014-11-08 09:30:28 -0700 | [diff] [blame] | 85 | BOOST_CHECK(in1 == entry.getInRecord(*face1)); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 86 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 87 | // insert out-record |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 88 | time::steady_clock::TimePoint before2 = time::steady_clock::now(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 89 | OutRecordCollection::iterator out1 = entry.insertOrUpdateOutRecord(face1, *interest1); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 90 | time::steady_clock::TimePoint after2 = time::steady_clock::now(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 91 | const OutRecordCollection& outRecords2 = entry.getOutRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 92 | BOOST_CHECK_EQUAL(outRecords2.size(), 1); |
| 93 | BOOST_CHECK(out1 == outRecords2.begin()); |
| 94 | BOOST_CHECK_EQUAL(out1->getFace(), face1); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 95 | BOOST_CHECK_EQUAL(out1->getLastNonce(), interest1->getNonce()); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 96 | BOOST_CHECK_GE(out1->getLastRenewed(), before2); |
| 97 | BOOST_CHECK_LE(out1->getLastRenewed(), after2); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 98 | BOOST_CHECK_LE(out1->getExpiry() - out1->getLastRenewed() |
| 99 | - interest1->getInterestLifetime(), |
| 100 | (after2 - before2)); |
Junxiao Shi | b2bcbcd | 2014-11-08 09:30:28 -0700 | [diff] [blame] | 101 | BOOST_CHECK(out1 == entry.getOutRecord(*face1)); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 102 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 103 | // update in-record |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 104 | time::steady_clock::TimePoint before3 = time::steady_clock::now(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 105 | InRecordCollection::iterator in2 = entry.insertOrUpdateInRecord(face1, *interest2); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 106 | time::steady_clock::TimePoint after3 = time::steady_clock::now(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 107 | const InRecordCollection& inRecords3 = entry.getInRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 108 | BOOST_CHECK_EQUAL(inRecords3.size(), 1); |
| 109 | BOOST_CHECK(in2 == inRecords3.begin()); |
| 110 | BOOST_CHECK_EQUAL(in2->getFace(), face1); |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 111 | BOOST_CHECK_EQUAL(in2->getLastNonce(), interest2->getNonce()); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 112 | BOOST_CHECK_LE(in2->getExpiry() - in2->getLastRenewed() |
| 113 | - interest2->getInterestLifetime(), |
| 114 | (after3 - before3)); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 115 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 116 | // insert another in-record |
| 117 | InRecordCollection::iterator in3 = entry.insertOrUpdateInRecord(face2, *interest3); |
| 118 | const InRecordCollection& inRecords4 = entry.getInRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 119 | BOOST_CHECK_EQUAL(inRecords4.size(), 2); |
| 120 | BOOST_CHECK_EQUAL(in3->getFace(), face2); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 121 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 122 | // get in-record |
| 123 | InRecordCollection::iterator in4 = entry.getInRecord(*face1); |
| 124 | BOOST_REQUIRE(in4 != entry.in_end()); |
Junxiao Shi | 66f91f8 | 2014-05-10 17:28:58 -0700 | [diff] [blame] | 125 | BOOST_CHECK_EQUAL(in4->getFace(), face1); |
| 126 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 127 | // clear in-records |
| 128 | entry.clearInRecords(); |
| 129 | const InRecordCollection& inRecords5 = entry.getInRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 130 | BOOST_CHECK_EQUAL(inRecords5.size(), 0); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 131 | BOOST_CHECK(entry.getInRecord(*face1) == entry.in_end()); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 132 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 133 | // insert another out-record |
| 134 | OutRecordCollection::iterator out2 = |
Junxiao Shi | f3c0781 | 2014-03-11 21:48:49 -0700 | [diff] [blame] | 135 | entry.insertOrUpdateOutRecord(face2, *interest4); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 136 | const OutRecordCollection& outRecords3 = entry.getOutRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 137 | BOOST_CHECK_EQUAL(outRecords3.size(), 2); |
| 138 | BOOST_CHECK_EQUAL(out2->getFace(), face2); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 139 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 140 | // get out-record |
| 141 | OutRecordCollection::iterator out3 = entry.getOutRecord(*face1); |
| 142 | BOOST_REQUIRE(out3 != entry.out_end()); |
Junxiao Shi | 66f91f8 | 2014-05-10 17:28:58 -0700 | [diff] [blame] | 143 | BOOST_CHECK_EQUAL(out3->getFace(), face1); |
| 144 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 145 | // delete out-record |
Junxiao Shi | b2bcbcd | 2014-11-08 09:30:28 -0700 | [diff] [blame] | 146 | entry.deleteOutRecord(*face2); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 147 | const OutRecordCollection& outRecords4 = entry.getOutRecords(); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 148 | BOOST_REQUIRE_EQUAL(outRecords4.size(), 1); |
| 149 | BOOST_CHECK_EQUAL(outRecords4.begin()->getFace(), face1); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 150 | BOOST_CHECK(entry.getOutRecord(*face2) == entry.out_end()); |
Junxiao Shi | d3c792f | 2014-01-30 00:46:13 -0700 | [diff] [blame] | 151 | } |
| 152 | |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 153 | BOOST_AUTO_TEST_CASE(Lifetime) |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 154 | { |
| 155 | shared_ptr<Interest> interest = makeInterest("ndn:/7oIEurbgy6"); |
Junxiao Shi | a110f26 | 2014-10-12 12:35:20 -0700 | [diff] [blame] | 156 | // library uses -1 to indicate unset lifetime |
| 157 | BOOST_ASSERT(interest->getInterestLifetime() < time::milliseconds::zero()); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 158 | |
| 159 | shared_ptr<Face> face = make_shared<DummyFace>(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 160 | Entry entry(*interest); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 161 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 162 | InRecordCollection::iterator inIt = entry.insertOrUpdateInRecord(face, *interest); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 163 | BOOST_CHECK_GT(inIt->getExpiry(), time::steady_clock::now()); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 164 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 165 | OutRecordCollection::iterator outIt = entry.insertOrUpdateOutRecord(face, *interest); |
Alexander Afanasyev | eb3197f | 2014-03-17 19:28:18 -0700 | [diff] [blame] | 166 | BOOST_CHECK_GT(outIt->getExpiry(), time::steady_clock::now()); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 167 | } |
| 168 | |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 169 | BOOST_AUTO_TEST_CASE(OutRecordNack) |
| 170 | { |
| 171 | shared_ptr<Face> face1 = make_shared<DummyFace>(); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 172 | OutRecord outR(face1); |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 173 | BOOST_CHECK(outR.getIncomingNack() == nullptr); |
| 174 | |
| 175 | shared_ptr<Interest> interest1 = makeInterest("ndn:/uWiapGjYL"); |
| 176 | interest1->setNonce(165); |
| 177 | outR.update(*interest1); |
| 178 | BOOST_CHECK(outR.getIncomingNack() == nullptr); |
| 179 | |
| 180 | shared_ptr<Interest> interest2 = makeInterest("ndn:/uWiapGjYL"); |
| 181 | interest2->setNonce(996); |
| 182 | lp::Nack nack2(*interest2); |
| 183 | nack2.setReason(lp::NackReason::CONGESTION); |
| 184 | BOOST_CHECK_EQUAL(outR.setIncomingNack(nack2), false); |
| 185 | BOOST_CHECK(outR.getIncomingNack() == nullptr); |
| 186 | |
| 187 | lp::Nack nack1(*interest1); |
| 188 | nack1.setReason(lp::NackReason::DUPLICATE); |
| 189 | BOOST_CHECK_EQUAL(outR.setIncomingNack(nack1), true); |
| 190 | BOOST_REQUIRE(outR.getIncomingNack() != nullptr); |
| 191 | BOOST_CHECK_EQUAL(outR.getIncomingNack()->getReason(), lp::NackReason::DUPLICATE); |
| 192 | |
| 193 | outR.clearIncomingNack(); |
| 194 | BOOST_CHECK(outR.getIncomingNack() == nullptr); |
| 195 | } |
| 196 | |
| 197 | BOOST_AUTO_TEST_SUITE_END() // PitEntry |
| 198 | |
| 199 | |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 200 | BOOST_AUTO_TEST_CASE(Insert) |
| 201 | { |
| 202 | Name name1("ndn:/5vzBNnMst"); |
| 203 | Name name2("ndn:/igSGfEIM62"); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 204 | Exclude exclude1; |
| 205 | exclude1.excludeOne(Name::Component("u26p47oep")); |
| 206 | Exclude exclude2; |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 207 | exclude2.excludeBefore(Name::Component("u26p47oep")); |
| 208 | ndn::KeyLocator keyLocator1("ndn:/sGAE3peMHA"); |
| 209 | ndn::KeyLocator keyLocator2("ndn:/nIJH6pr4"); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 210 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 211 | NameTree nameTree(16); |
| 212 | Pit pit(nameTree); |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 213 | BOOST_CHECK_EQUAL(pit.size(), 0); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 214 | std::pair<shared_ptr<Entry>, bool> insertResult; |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 215 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 216 | // base |
| 217 | shared_ptr<Interest> interestA = make_shared<Interest>(name1); |
| 218 | insertResult = pit.insert(*interestA); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 219 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 220 | BOOST_CHECK_EQUAL(pit.size(), 1); |
| 221 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 222 | // A+MinSuffixComponents |
| 223 | shared_ptr<Interest> interestB = make_shared<Interest>(*interestA); |
| 224 | interestB->setMinSuffixComponents(2); |
| 225 | insertResult = pit.insert(*interestB); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 226 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 227 | BOOST_CHECK_EQUAL(pit.size(), 2); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 228 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 229 | // A+MaxSuffixComponents |
| 230 | shared_ptr<Interest> interestC = make_shared<Interest>(*interestA); |
| 231 | interestC->setMaxSuffixComponents(4); |
| 232 | insertResult = pit.insert(*interestC); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 233 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 234 | BOOST_CHECK_EQUAL(pit.size(), 3); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 235 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 236 | // A+KeyLocator1 |
| 237 | shared_ptr<Interest> interestD = make_shared<Interest>(*interestA); |
| 238 | interestD->setPublisherPublicKeyLocator(keyLocator1); |
| 239 | insertResult = pit.insert(*interestD); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 240 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 241 | BOOST_CHECK_EQUAL(pit.size(), 4); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 242 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 243 | // A+KeyLocator2 |
| 244 | shared_ptr<Interest> interestE = make_shared<Interest>(*interestA); |
| 245 | interestE->setPublisherPublicKeyLocator(keyLocator2); |
| 246 | insertResult = pit.insert(*interestE); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 247 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 248 | BOOST_CHECK_EQUAL(pit.size(), 5); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 249 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 250 | // A+Exclude1 |
| 251 | shared_ptr<Interest> interestF = make_shared<Interest>(*interestA); |
| 252 | interestF->setExclude(exclude1); |
| 253 | insertResult = pit.insert(*interestF); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 254 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 255 | BOOST_CHECK_EQUAL(pit.size(), 6); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 256 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 257 | // A+Exclude2 |
| 258 | shared_ptr<Interest> interestG = make_shared<Interest>(*interestA); |
| 259 | interestG->setExclude(exclude2); |
| 260 | insertResult = pit.insert(*interestG); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 261 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 262 | BOOST_CHECK_EQUAL(pit.size(), 7); |
| 263 | |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 264 | // A+ChildSelector0 |
| 265 | shared_ptr<Interest> interestH = make_shared<Interest>(*interestA); |
| 266 | interestH->setChildSelector(0); |
| 267 | insertResult = pit.insert(*interestH); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 268 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 269 | BOOST_CHECK_EQUAL(pit.size(), 8); |
Junxiao Shi | 30d3599 | 2014-04-03 14:51:58 -0700 | [diff] [blame] | 270 | |
| 271 | // A+ChildSelector1 |
| 272 | shared_ptr<Interest> interestI = make_shared<Interest>(*interestA); |
| 273 | interestI->setChildSelector(1); |
| 274 | insertResult = pit.insert(*interestI); |
| 275 | BOOST_CHECK_EQUAL(insertResult.second, true); |
| 276 | BOOST_CHECK_EQUAL(pit.size(), 9); |
| 277 | |
| 278 | // A+MustBeFresh |
| 279 | shared_ptr<Interest> interestJ = make_shared<Interest>(*interestA); |
| 280 | interestJ->setMustBeFresh(true); |
| 281 | insertResult = pit.insert(*interestJ); |
| 282 | BOOST_CHECK_EQUAL(insertResult.second, true); |
| 283 | BOOST_CHECK_EQUAL(pit.size(), 10); |
| 284 | |
| 285 | // A+InterestLifetime |
| 286 | shared_ptr<Interest> interestK = make_shared<Interest>(*interestA); |
| 287 | interestK->setInterestLifetime(time::milliseconds(1000)); |
| 288 | insertResult = pit.insert(*interestK); |
| 289 | BOOST_CHECK_EQUAL(insertResult.second, false);// only guiders differ |
| 290 | BOOST_CHECK_EQUAL(pit.size(), 10); |
| 291 | |
| 292 | // A+Nonce |
| 293 | shared_ptr<Interest> interestL = make_shared<Interest>(*interestA); |
| 294 | interestL->setNonce(2192); |
| 295 | insertResult = pit.insert(*interestL); |
| 296 | BOOST_CHECK_EQUAL(insertResult.second, false);// only guiders differ |
| 297 | BOOST_CHECK_EQUAL(pit.size(), 10); |
| 298 | |
| 299 | // different Name+Exclude1 |
| 300 | shared_ptr<Interest> interestM = make_shared<Interest>(name2); |
| 301 | interestM->setExclude(exclude1); |
| 302 | insertResult = pit.insert(*interestM); |
| 303 | BOOST_CHECK_EQUAL(insertResult.second, true); |
| 304 | BOOST_CHECK_EQUAL(pit.size(), 11); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 305 | } |
| 306 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 307 | BOOST_AUTO_TEST_CASE(Erase) |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 308 | { |
Alexander Afanasyev | 28d586a | 2014-07-10 20:10:54 -0700 | [diff] [blame] | 309 | shared_ptr<Interest> interest = makeInterest("/z88Admz6A2"); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 310 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 311 | NameTree nameTree(16); |
| 312 | Pit pit(nameTree); |
| 313 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 314 | std::pair<shared_ptr<Entry>, bool> insertResult; |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 315 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 316 | BOOST_CHECK_EQUAL(pit.size(), 0); |
| 317 | |
Alexander Afanasyev | 28d586a | 2014-07-10 20:10:54 -0700 | [diff] [blame] | 318 | insertResult = pit.insert(*interest); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 319 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 320 | BOOST_CHECK_EQUAL(pit.size(), 1); |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 321 | BOOST_CHECK(pit.find(*interest) != nullptr); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 322 | |
Alexander Afanasyev | 28d586a | 2014-07-10 20:10:54 -0700 | [diff] [blame] | 323 | insertResult = pit.insert(*interest); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 324 | BOOST_CHECK_EQUAL(insertResult.second, false); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 325 | BOOST_CHECK_EQUAL(pit.size(), 1); |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 326 | BOOST_CHECK(pit.find(*interest) != nullptr); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 327 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 328 | pit.erase(insertResult.first); |
| 329 | BOOST_CHECK_EQUAL(pit.size(), 0); |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 330 | BOOST_CHECK(pit.find(*interest) == nullptr); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 331 | |
Alexander Afanasyev | 28d586a | 2014-07-10 20:10:54 -0700 | [diff] [blame] | 332 | insertResult = pit.insert(*interest); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 333 | BOOST_CHECK_EQUAL(insertResult.second, true); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 334 | BOOST_CHECK_EQUAL(pit.size(), 1); |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 335 | BOOST_CHECK(pit.find(*interest) != nullptr); |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 336 | } |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 337 | |
Junxiao Shi | ee5a444 | 2014-07-27 17:13:43 -0700 | [diff] [blame] | 338 | BOOST_AUTO_TEST_CASE(EraseNameTreeEntry) |
| 339 | { |
| 340 | NameTree nameTree; |
| 341 | Pit pit(nameTree); |
| 342 | size_t nNameTreeEntriesBefore = nameTree.size(); |
| 343 | |
| 344 | shared_ptr<Interest> interest = makeInterest("/37xWVvQ2K"); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 345 | shared_ptr<Entry> entry = pit.insert(*interest).first; |
Junxiao Shi | ee5a444 | 2014-07-27 17:13:43 -0700 | [diff] [blame] | 346 | pit.erase(entry); |
| 347 | BOOST_CHECK_EQUAL(nameTree.size(), nNameTreeEntriesBefore); |
| 348 | } |
| 349 | |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 350 | BOOST_AUTO_TEST_CASE(FindAllDataMatches) |
| 351 | { |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 352 | Name nameA ("ndn:/A"); |
| 353 | Name nameAB ("ndn:/A/B"); |
| 354 | Name nameABC ("ndn:/A/B/C"); |
| 355 | Name nameABCD("ndn:/A/B/C/D"); |
| 356 | Name nameD ("ndn:/D"); |
| 357 | |
Alexander Afanasyev | 28d586a | 2014-07-10 20:10:54 -0700 | [diff] [blame] | 358 | shared_ptr<Interest> interestA = makeInterest(nameA ); |
| 359 | shared_ptr<Interest> interestABC = makeInterest(nameABC); |
| 360 | shared_ptr<Interest> interestD = makeInterest(nameD ); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 361 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 362 | NameTree nameTree(16); |
| 363 | Pit pit(nameTree); |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 364 | int count = 0; |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 365 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 366 | BOOST_CHECK_EQUAL(pit.size(), 0); |
| 367 | |
Alexander Afanasyev | 28d586a | 2014-07-10 20:10:54 -0700 | [diff] [blame] | 368 | pit.insert(*interestA ); |
| 369 | pit.insert(*interestABC); |
| 370 | pit.insert(*interestD ); |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 371 | |
| 372 | nameTree.lookup(nameABCD); // make sure /A/B/C/D is in nameTree |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 373 | |
Haowei Yuan | 78c84d1 | 2014-02-27 15:35:13 -0600 | [diff] [blame] | 374 | BOOST_CHECK_EQUAL(pit.size(), 3); |
| 375 | |
Alexander Afanasyev | c026d25 | 2014-06-16 11:14:15 -0700 | [diff] [blame] | 376 | shared_ptr<Data> data = makeData(nameABCD); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 377 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 378 | DataMatchResult matches = pit.findAllDataMatches(*data); |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 379 | |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 380 | bool hasA = false; |
| 381 | bool hasAB = false; |
| 382 | bool hasABC = false; |
| 383 | bool hasD = false; |
| 384 | |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 385 | for (const shared_ptr<Entry>& entry : matches) { |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 386 | ++count; |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 387 | |
| 388 | if (entry->getName().equals(nameA )) |
| 389 | hasA = true; |
| 390 | |
| 391 | if (entry->getName().equals(nameAB)) |
| 392 | hasAB = true; |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 393 | |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 394 | if (entry->getName().equals(nameABC)) |
| 395 | hasABC = true; |
Junxiao Shi | 57f0f31 | 2014-03-16 11:52:20 -0700 | [diff] [blame] | 396 | |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 397 | if (entry->getName().equals(nameD)) |
| 398 | hasD = true; |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 399 | } |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 400 | BOOST_CHECK_EQUAL(hasA , true); |
| 401 | BOOST_CHECK_EQUAL(hasAB , false); |
| 402 | BOOST_CHECK_EQUAL(hasABC, true); |
| 403 | BOOST_CHECK_EQUAL(hasD , false); |
| 404 | |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 405 | BOOST_CHECK_EQUAL(count, 2); |
Junxiao Shi | 4370fde | 2016-02-24 12:20:46 -0700 | [diff] [blame] | 406 | } |
Haowei Yuan | e1079fc | 2014-03-08 14:41:25 -0600 | [diff] [blame] | 407 | |
Junxiao Shi | 4370fde | 2016-02-24 12:20:46 -0700 | [diff] [blame] | 408 | BOOST_AUTO_TEST_CASE(MatchFullName) // Bug 3363 |
| 409 | { |
| 410 | NameTree nameTree(16); |
| 411 | Pit pit(nameTree); |
| 412 | |
| 413 | shared_ptr<Data> data = makeData("/A"); |
| 414 | Name fullName = data->getFullName(); |
| 415 | shared_ptr<Interest> interest = makeInterest(fullName); |
| 416 | |
| 417 | pit.insert(*interest); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 418 | DataMatchResult matches = pit.findAllDataMatches(*data); |
Junxiao Shi | 4370fde | 2016-02-24 12:20:46 -0700 | [diff] [blame] | 419 | |
| 420 | BOOST_REQUIRE_EQUAL(std::distance(matches.begin(), matches.end()), 1); |
Junxiao Shi | 4846f37 | 2016-04-05 13:39:30 -0700 | [diff] [blame^] | 421 | shared_ptr<Entry> found = *matches.begin(); |
Junxiao Shi | 4370fde | 2016-02-24 12:20:46 -0700 | [diff] [blame] | 422 | BOOST_CHECK_EQUAL(found->getName(), fullName); |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 423 | } |
| 424 | |
Alexander Afanasyev | 750fa1c | 2015-01-03 17:28:31 -0800 | [diff] [blame] | 425 | BOOST_AUTO_TEST_CASE(Iterator) |
| 426 | { |
| 427 | NameTree nameTree(16); |
| 428 | Pit pit(nameTree); |
| 429 | |
| 430 | shared_ptr<Interest> interestA = makeInterest("/A"); |
| 431 | shared_ptr<Interest> interestABC1 = makeInterest("/A/B/C"); |
| 432 | shared_ptr<Interest> interestABC2 = makeInterest("/A/B/C"); |
| 433 | interestABC2->setSelectors(ndn::Selectors().setMinSuffixComponents(10)); |
| 434 | shared_ptr<Interest> interestD = makeInterest("/D"); |
| 435 | |
| 436 | BOOST_CHECK_EQUAL(pit.size(), 0); |
| 437 | BOOST_CHECK(pit.begin() == pit.end()); |
| 438 | |
| 439 | pit.insert(*interestABC1); |
| 440 | BOOST_CHECK_EQUAL(pit.size(), 1); |
| 441 | BOOST_CHECK(pit.begin() != pit.end()); |
| 442 | BOOST_CHECK(pit.begin()->getInterest() == *interestABC1); |
| 443 | BOOST_CHECK((*pit.begin()).getInterest() == *interestABC1); |
| 444 | |
| 445 | auto i = pit.begin(); |
| 446 | auto j = pit.begin(); |
| 447 | BOOST_CHECK(++i == pit.end()); |
| 448 | BOOST_CHECK(j++ == pit.begin()); |
| 449 | BOOST_CHECK(j == pit.end()); |
| 450 | |
| 451 | pit.insert(*interestA); |
| 452 | pit.insert(*interestABC2); |
| 453 | pit.insert(*interestD); |
| 454 | |
| 455 | std::set<const Interest*> expected = {&*interestA, &*interestABC1, &*interestABC2, &*interestD}; |
| 456 | std::set<const Interest*> actual; |
| 457 | for (const auto& pitEntry : pit) { |
| 458 | actual.insert(&pitEntry.getInterest()); |
| 459 | } |
| 460 | BOOST_CHECK(actual == expected); |
| 461 | for (auto actualIt = actual.begin(), expectedIt = expected.begin(); |
| 462 | actualIt != actual.end() && expectedIt != expected.end(); ++actualIt, ++expectedIt) { |
| 463 | BOOST_CHECK_EQUAL(**actualIt, **expectedIt); |
| 464 | } |
| 465 | } |
| 466 | |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 467 | BOOST_AUTO_TEST_SUITE_END() |
Junxiao Shi | 5e5e445 | 2015-09-24 16:56:52 -0700 | [diff] [blame] | 468 | BOOST_AUTO_TEST_SUITE_END() |
Junxiao Shi | cbba04c | 2014-01-26 14:21:22 -0700 | [diff] [blame] | 469 | |
Junxiao Shi | d9ee45c | 2014-02-27 15:38:11 -0700 | [diff] [blame] | 470 | } // namespace tests |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame] | 471 | } // namespace pit |
Alexander Afanasyev | 18bbf81 | 2014-01-29 01:40:23 -0800 | [diff] [blame] | 472 | } // namespace nfd |